After upgrading to Domino Server 8.01, the following code does not work in a Before New Mail agent
Dim rtitem as Variant
Dim rtBody As NotesRichTextItem
Dim rtPlainBody As NotesItem
Set rtitem = thisNote.GetFirstItem( “Body” )
If rtitem.Type = MIME_PART Then
session.ConvertMime = True
Set rtPlainBody = thisNote.GetFirstItem(“Body”)*
itemType = rtPlainBody.Type*
Set rtBody = thisNote.GetFirstItem(“Body”) << type mismatch on this line
session.ConvertMime = False
End If
- I added these 2 lines and found that when the agent is running Before New Mail, the Type is still MIME_PART (even with convertmime = True).
If the agent is running After New Mail the Type is (correctly) Rich Text and rtBody is set without error