The following script will check the current uidocument for attachments in the body and display the size of each.
Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.document
If doc.HasEmbedded Then
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
Messagebox( o.FileSize )
End If
End Forall
End If
End If
End Sub
Do you have comments on this Ask the Expert question and response? Let us know.
|