Uploading file - from disk to a "Body" (rtf) of a form - howto?

Hi everyone!

The problem is - and the subject says it all - how to upload a file from disk to a document.

I know how to get a name&path of a file through ws.Prompt (or @Prompt) function, but how to upload a file then?..

Thanks in advance,

 Dmitry.

Subject: Uploading file - from disk to a “Body” (rtf) of a form - howto?

Do you mean automatically attach a file, or allow a user to choose which file to put into a rich text field?

If the user is allowed to choose, why not just use NotesUIWorkspace.OpenFileDialog? You can then do a NotesRichTextItem.EmbedObject to attach the selected file.

Subject: Uploading file - from disk to a “Body” (rtf) of a form - howto?

Do you want to attach or “import” the content into your field?