Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21839

Convert Word Doc to PDF using VB6

$
0
0
Hi guys ! This is my first post, hope it's on the right place hehe...

Here is the code I'm using to make the conversion:


Code:

Word_App.ActiveDocument.ExportAsFixedFormat OutputFileName:="C:\p\Cartinha.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

But using this code, I get the following error:
Object Variable or With Block variable not set

Viewing all articles
Browse latest Browse all 21839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>