Hi,
The functionality needs to be implemented is:
When user clicks button named Attach File, a user is prompted to a dialog box which asks for do you want to attach a file? If user clicks Yes, then a form is opened in front of the user. In this form, there is one rich text field and a Browse button which will allow the user to select file which he wants to attach. Now this attached rich text file should also be moved to the field which is present in the document from where user clicked Attach File button.
How to achieve this?
Aditya.
Subject: Rich Text Field.
Why do you even need to open another form?All this can be done using dialog boxes using the @Prompt formula - just look up the help and you should be able to get the solution!
Remember - creating solutions is a developer’s role - solving problems is this forum’s role!
Subject: RE: Rich Text Field.
Well… I cant edit the document…Thats why I am trying something other way round…This means even if the code is written on Querymodechange…when certain conditions are met the document should not go in to the edit mode, the file should be attached the way mentioned before.
Subject: RE: Rich Text Field.
Take a look at the EmbedObject method in LotusScript. Unlike @Command([editinsertfileattachment]), it can be done to the back-end document and therefore doesn’t require the document to be in edit mode
Mike
Subject: RE: Rich Text Field.
But, of course, to actually display the newly added attachment to the user, the document has to be closed and reopened (which can be done using LS as well).
Subject: RE: Rich Text Field.
Well…I had tried EmbedObject method before. But the problem is user should be provided the facility to browse through the computer…and for EmbedObject method to work the name/filepath of the file is to be mentioned which is always going to be different…
Subject: RE: Rich Text Field.
NotesUIWorkspace.OpenFileDialog to get the file name
Using the return value from that, use the EmbedObject method