Examples: Type property (NotesEmbeddedObject - LotusScript®)
This script counts the number of embedded objects, object links, and file attachments in the Body item of a document, and prints the results in the status bar. For example, the script prints "3 attachments 2 links 4 objects."
Dim doc As NotesDocument
Dim rtitem As Variant
Dim attachCount As Integer
Dim linkCount As Integer
Dim objectCount As Integer
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
attachCount = 0
linkCount = 0
objectCount = 0
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
Select Case o.Type
Case EMBED_ATTACHMENT:
attachCount = attachCount + 1
Case EMBED_OBJECTLINK:
linkCount = linkCount + 1
Case EMBED_OBJECT:
objectCount = objectCount + 1
End Select
End Forall
End If
Print( attachCount & " attachments " & linkCount & _
" links " & objectCount & " objects " )