Простой экспорт из Richtext-ового поля в Rtf файл

morpheus

скриптописец
07.08.2006
3 915
1
#1
Сам если чесно не проверял

Код:
Declaretion
Declare Function ExportRTF Lib "nxrtf" Alias "ExportRTF"(Byval sTempFile_
As String, Byval flags As Long, hmod As Long, Byval altlibrary As String,_
Byval sRTFFile As String) As Integer
Declare Function MailGetMessageBodyComposite Lib "nnotes.dll"(Byval hNote_
As Long, Byval ItemName As String,Byval FileName As String,_
FileSize As Long)As Integer

Sub Click(Source As Button)
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) 
Call MailGetMessageBodyComposite(Doc.handle , "$Fonts", font_file$,fileSize)
Call ExportRTF(file_name, 0, 0, "", "c:\\temp\\export.rtf")
Messagebox "Текст экспортирован в файл c:\\temp\\export.rtf",64,"Экспорт"
End Sub
Источник