Examples: GetAttachment method
- This script gets an attachment called JIM.SAM from a document.
Dim doc As NotesDocument
Dim object As NotesEmbeddedObject
'...set value of doc...
Set object = doc.GetAttachment( "jim.sam" )
- This script checks the Body item of a document to see if it contains
an attachment called JILL.SAM. If not, the script uses GetAttachment
to search the entire document for the attachment.
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
' check for attachment in Body item
Set object = rtitem.GetEmbeddedObject( "jill.sam" )
If ( object Is Nothing ) Then
' check for attachment in rest of document
Set object = doc.GetAttachment( "jill.sam" )
End If
End If
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.