Creating PDF files with Office 2007

From Lotus Script you can create a Word object – see this blog entry
Then you can fill it with data from your Notes Document and just save it as an PDF document

The easiest way to make the script, is to record a macro in Word and the convert the code to Lotus Script.

This line is from a Word macro, and show how to save the current document as a PDF file:

ActiveDocument.ExportAsFixedFormat OutputFileName:= “c:tempsample.pdf”, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:=wdExportOptimizeForPrint, Range:= wdExportAllDocument, From:=1, To:=1, Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, CreateBookmarks:= wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:=True, UseISO19005_1:=False

To convert it to Lotus Script you need to translate all the constants to a value (and remove the parameter label).
To convert: In the Visual Basic editor, just right click on a constant – then select ‘Quick Info’ Or you can find all the constants in this database
Note – you can skip the last parameters if you don’t need them (using defaults)

The converted script will look like this

yourwordobject.ActiveDocument.ExportAsFixedFormat “c:tempsample.pdf”, 17, false, 0, 0