LOTUSSCRIPT/COM/OLE CLASSES
Dim doc As NotesDocument Dim item As NotesItem Dim j As Integer '...set value of doc... Set item = doc.GetFirstItem( "SendTo" ) ' if there's no SendTo item ' try to find another item of type Names, that has a value If ( item Is Nothing ) Then Forall i In doc.Items If i.IsNames And ( i.Values( 0 ) <> "" ) Then Set item = i Exit Forall End If End Forall ' if we found an item of type Names ' mail the document to people in that item If Not ( item Is Nothing ) Then Call doc.Send( False, item.Values ) End If ' if there is a SendTo item, no parameters needed ' mail the document Else Call doc.Send( False ) End If
See Also