I finally finished my word doc. But now I was told to create a PDF instead u.u
I tried this code:
But I'm getting this error:
Object Variable or With Block variable not set
I tried this code:
Code:
Dim Word_App As Word.Application Set Word_App = New Word.Application 'Create and fill the word document. 'Save the document as PDF Word_App.ActiveDocument.ExportAsFixedFormat OutputFileName:=Replace(strPath, ".rtf", "") & " - " & vtCartas(iMarcaCartasIndividuais).strMatricula & ".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
Object Variable or With Block variable not set
Comment