Skip to main content

Examples: EmbeddedObjects property (NotesDocument - LotusScript)

This script uses the EmbeddedObjects property in NotesDocument. The last document in the All Documents view of HILL.NSF contains the following:

  • A Microsoft Excel object link called "MS Excel Worksheet" in the Body item
  • A file attachment called "CASTLE.BMP" in the Body item
Sub Initialize
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = New NotesDatabase( "SanFrancisco", "hill.nsf" )
Set view = db.GetView( "All Documents" )
Set doc = view.GetLastDocument
If doc.HasEmbedded Then
Forall o In doc.EmbeddedObjects
Messagebox( o.Name )
End Forall
Else
Messagebox "No embedded objects found"
End If
End Sub

This script displays the "MS Excel Worksheet".

EmbeddedObjects does not return castle.bmp because castle.bmp is a file attachment.