Hi,
I’m working on exporting some documents from Lotus Notes. I thought Word would be the best format for the output, and I have Lotusscript code that does export successfully. The problem I have is that one of the fields I need to export is a rich text field that sometimes has attachments (e.g. Word, PDF, Excel) in it. Does anyone know if it’s possible to export these as objects into Word?
Here’s my code which does work, but only the text is exported for the rich text field (rtDesc):
(Declarations)
Const wdCell = 12
Const wdLine =5
Const END_OF_TABLE = 6
Sub Initialize
…blah blah get NotesDocument docContact
'Create Word object
Set vntWord = CreateObject("Word.Application")
vntWord.Visible = False
Call vntWord.Documents.Add
With vntWord
.ActiveDocument.PageSetup.LeftMargin = 40
.ActiveDocument.Tables.Add vntWord.Selection.Range, 2, 6
.Selection.Tables(1).Select
'.Selection.Tables(1).Borders.Enable = True
.Selection.Font.Size = 8
.Selection.Cells.Width = 90
.Selection.Font.Bold = True
.Selection.TypeText "Subject:"
.Selection.MoveRight wdCell
.Selection.Font.Bold = False
.Selection.TypeText docContact.kwdSubject(0)
.Selection.MoveRight wdCell
.Selection.Font.Bold = True
.Selection.TypeText "Division:"
.Selection.MoveRight wdCell
.Selection.Font.Bold = False
.Selection.TypeText docContact.kwdDivision(0)
.Selection.MoveRight wdCell
.Selection.Font.Bold = True
.Selection.TypeText "Business Area:"
.Selection.MoveRight wdCell
.Selection.Font.Bold = False
.Selection.TypeText docContact.kwdBusArea(0)
.Selection.MoveRight wdCell
.Selection.Font.Bold = True
.Selection.TypeText "Rule:"
.Selection.MoveRight wdCell
.Selection.Font.Bold = False
.Selection.TypeText docContact.txtRule(0)
.Selection.EndKey END_OF_TABLE
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.Font.Size = 8
.Selection.Font.Bold = True
.Selection.TypeText "Description and/or Attachment:"
.Selection.TypeParagraph
.Selection.Font.Bold = False
Set rtDesc = docContact.GetFirstItem("rtDesc")
.Selection.TypeText rtDesc.Values
End With
vntWord.Visible = True
…blah blah error trapping etc
Thanks in advance for any advice.