Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-18-2016, 09:26 PM
gmayor's Avatar
gmayor gmayor is offline Save as PDF with bookmarks Windows 10 Save as PDF with bookmarks Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 08-18-2016, 09:33 PM
Albus Albus is offline Save as PDF with bookmarks Windows 7 64bit Save as PDF with bookmarks Office 2010 64bit
Novice
Save as PDF with bookmarks
 
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmarks Schildkröte Word VBA 8 06-28-2015 11:13 AM
Save as PDF with bookmarks Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM
Can't See Bookmarks bobmayo Word 21 06-04-2013 07:37 AM
Save as PDF with bookmarks When I try to save an existing word doc, save as pops up and will not save... samanthab Word 3 01-19-2013 06:27 AM
Save as PDF with bookmarks Macro VBA "Save as" with bookmarks in file name string Dom37 Word VBA 2 10-31-2011 03:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft