Search code examples
lotus-noteslotus-dominolotusscript

Lotus Notes: Displaying Image attachment on a document


I have a field (Rich Text), that holds the value of an image attachment, but it only display the image path and filename, not as an image display. Am I using the wrong field or there's a problem in my line of code to attach the image? The code to attach is right below:

chqRSIDoc.photodoc = workspace.Openfiledialog(True, "Select a file to attach as photo: ", "", "c:\")

Appreciate all the help. Thanks!


Solution

  • The openFileDialog returns just a string array. see http://www.ibm.com/support/knowledgecenter/SSVRGU_9.0.0/com.ibm.designer.domino.main.doc/H_OPENFILEDIALOG_METHOD_5310_ABOUT.html
    I assume thatyour chqRSIDoc is of NotesDocument. If you want it as an attachment you'll have to use the NotesRichTextItem.EmbedObject function.