GetAttachment (NotesDocument - LotusScript®)

Given the name of a file attachment, returns a NotesEmbeddedObject representing the attachment. You can use this method to find file attachments which are not contained in a rich text item (such as an attachment in a Release 2 database), as well as file attachments that are contained in a rich text item.

Defined in

NotesDocument

Syntax

Set notesEmbeddedObject = notesDocument .GetAttachment( fileName$ )

Parameters

fileName$

String. The name of the file attachment you want.

Return value

notesEmbeddedObject

A NotesEmbeddedObject that represents the file attachment. Returns Nothing if an attachment by the specified name is not found.

Usage

The Parent property for the returned NotesEmbeddedObject returns Nothing, since it was not accessed through a NotesRichTextItem.

Example