I am trying to take a user in the current document and allow them to send the form to an external non-notes client. Currently it sends it in ASCII text and the formatting is all over the place… From the LS help:
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Set db = s.CurrentDatabase
Set stream = s.CreateStream
s.ConvertMIME = False ’ Do not convert MIME to rich text
Set doc = db.CreateDocument
Call doc.ReplaceItemValue(“Form”, “Memo”)
Set body = doc.CreateMIMEEntity
Set header = body.CreateHeader(“Subject”)
Call header.SetHeaderVal(“MIME message”)
Set header = body.CreateHeader(“To”)
Call header.SetHeaderVal(“Roberta Person”)
Call stream.WriteText(“Text of message.”)
Call body.SetContentFromText _
(stream, “text/plain;charset=UTF-8”, ENC_NONE)
Call doc.Send(False)
s.ConvertMIME = True ’ Restore conversion
End Sub
this allows to create an email in mime format, but I want to take the body of the current form and insert it into the email OR just need the code to convert the form to mime? I have been searching the form for similar snipets but just can find any examples.