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

Hello,

These are the requirements for my macro:
1. Save the current document in the same folder with the same document name, except it will end in .pdf.
2. The "create bookmarks from headers" option is enabled.
3. It will prompt me if there is a file with the current name already.

I have this code, which accomplishes 1 and 3, but how would I add to it so that "create bookmarks from headers" is always enabled:

Code:
    Sub Save_to_PDF()
    
      With Dialogs(wdDialogFileSaveAs)
            .Format = wdFormatPDF
            .Show
         End With
    
    End Sub
Thanks for your help!
Reply With Quote