Search code examples
lotus-noteslotusscript

How to convert a NotesDocument to MIME


Why does the following function always return Nothing?

Function GetMimeEntity(Doc As NotesDocument) As NotesMimeEntity
    Set GetMimeEntity = Doc.GetMIMEEntity

    If GetMimeEntity Is Nothing Then
        Doc.ConvertToMIME 2
        Set GetMimeEntity = Doc.GetMIMEEntity
    End If
End Function

Doc is an email.


Solution

  • Are you setting session.convertMIME = false before running this? Otherwise the NotesSession will convert any MIME content to CD records.