Thread: [Solved] Save as PDF with bookmarks
View Single Post
 
Old 08-18-2016, 09:33 PM
Albus Albus is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Dec 2014
Posts: 12
Albus is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Use instead the following. You will have to supply the name and path (here - strDocName).

Code:
ActiveDocument.ExportAsFixedFormat OutputFilename:=strDocName, _
                                       ExportFormat:=wdExportFormatPDF, _
                                       OpenAfterExport:=False, _
                                       OptimizeFor:=wdExportOptimizeForPrint, _
                                       Range:=wdExportAllDocument, From:=1, to:=1, _
                                       Item:=wdExportDocumentContent, _
                                       IncludeDocProps:=True, _
                                       KeepIRM:=True, _
                                       CreateBookmarks:=wdExportCreateHeadingBookmarks, _
                                       DocStructureTags:=True, _
                                       BitmapMissingFonts:=True, _
                                       UseISO19005_1:=False
Hey thanks for the reply. I don't have access to test but do you know if this will prompt me to choose if I want to overwrite a file that already exists with the same name?
Reply With Quote