Manage Learn to apply best practices and optimize your operations.

Count Attachments In Open Document

When counting attachments in an open document via script I encountered problems
using NotesEmbeddedObject. I solved it by using Evaluate.
This example gives a message if there are more than one attachment in the
document.

Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDOcument
Set uidoc=ws.CurrentDocument
Set doc = uidoc.Document

NotesMacro$="@Attachments"
count_attachments=Evaluate(NotesMacro$,doc)
If count_attachments(0)>"1" Then
Messagebox "Use only one attachment!"
End If

Dig Deeper on Lotus Notes Domino Administration Tools

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

SearchDataCenter
SearchContentManagement
Close