I can export to PDF from Word just fine with:
Var WordApp As WordApplication
Var CurrentDoc As WordDocument
WordApp = New WordApplication
WordApp.Visible = false
WordApp.Documents.Open(FileName)
'CurrentDoc = WordApp.ActiveDocument
WordApp.ActiveDocument.ExportAsFixedFormat(NewFileName,17)
Exception err As OleException
MessageDialog.Show(err.Message)
17 = PDF format. But I need to create PDF/A (archive) type PDF’s. In VBA there is this flag UseISO19005_1 which I need. But I can’t get it to work from Xojo.
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"MyNewPDF.pdf" _
, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=True
WordApp.ActiveDocument.ExportAsFixedFormat(NewFileName,17, , , , , , , , , , , , True) gives a syntax error, with or without parenthesis.