Dim objDoc As Object Dim rngRange As Object Dim WordApp As Object Set objDoc = CreateObject("Word.Document") Set WordApp = CreateObject("Word.Application") With WordApp Set objDoc = .Documents.Open(g_strPath & "\Documents\Report.doc") objDoc.activate WordApp.ActiveDocument.ExportAsFixedFormat OutputFileName:= _ App.Path & "\Documents\Report.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:=False objDoc.PrintOut FileName = "C:\MyReport.pdf" Set objDoc = Nothing Set rngRange = Nothing .visible = True end with
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)