I need to generate a fax cover sheet on the fly as an attachment for an automated fax service we’re going to use. I’d like to generate an rtf file in order to keep the formatting.
I’m having some issues getting ExportRTF to work…
I’m generating mail messages in a scheduled agent and creating the rich text fields on the fly. Is it possible to use exportRTF for that? Any other suggestions?
Here’s a sample I found:
Dim Ws As New NotesUIWorkspace
Dim Doc As NotesDocument
Set Doc = Ws.CurrentDocument.Document
Dim fileSize As Long
Const file_name = “c:\temp\text.cd”
Const font_file = “c:\temp\fonts.cd”
Call MailGetMessageBodyComposite(Doc.handle , “Body”, FILE_NAME$, fileSize) ’ write to file body field
Call MailGetMessageBodyComposite(Doc.handle , “$Fonts”, font_file$, fileSize) ’ write to file font field
Call concatenate (font_file,file_name, “c:\temp\export.cd”) 'make one file
Call ExportRTF(“c:\temp\export.cd”, 0, 0, “”, “c:\temp\export.rtf” )
End Sub
export.rtf