LOTUSSCRIPT/COM/OLE CLASSES


Examples: BoundaryEnd property
This agent displays the start and end boundaries for each child entity in a multipart entity, assuming two levels.

Sub Initialize
 Dim s As New NotesSession
 Dim db As NotesDatabase
 Dim dc As NotesDocumentCollection
 Dim doc As NotesDocument
 Dim mime As NotesMIMEEntity
 Dim child As NotesMIMEEntity
 Dim m As String
 Set db = s.CurrentDatabase
 s.ConvertMIME = False ' Do not convert MIME to rich text
 Set dc = db.UnprocessedDocuments
 Set doc = dc.GetFirstDocument
 While Not(doc Is Nothing)
   Set mime = doc.GetMIMEEntity
   If Not(mime Is Nothing) Then
     If mime.ContentType = "multipart" Then
       n = 1
       Set child = mime.GetFirstChildEntity
       While Not(child Is Nothing)
         m$ = "Start boundary: {" & _
         child.BoundaryStart & "}" & Chr(10)
         m$ = m$ & "End boundary: {" & _
         child.BoundaryEnd & "}"
         Messagebox m$,, "Child " & n
         n = n + 1
         Set child = child.GetNextSibling
       Wend
     Else ' if not multipart
       Messagebox "Not multipart",, _
       doc.GetItemValue("Subject")(0)
     End If
   Else ' if not MIME
     Messagebox "Not MIME",, doc.GetItemValue("Subject")(0)
   End If
   Set doc = dc.GetNextDocument(doc)
 Wend
 s.ConvertMIME = True ' Restore conversion
End Sub

See Also