Hello,
I'm using Excel 2010 and have Acrobat XI Standard.
I have about 50 Excel files that I want to turn into 50 individual PDF files. Each Excel file has many sheets, and I want each PDF file to contain all the sheets and have a bookmark for each sheet. The bookmark should be the same as the sheet name.
In summary, I wrote a macro that will save each file as a PDF with all the sheets, but it will not include bookmarks. Here is my process:
From Excel, I can open a file and click File > Save as Adobe PDF. This will save as PDF with bookmarks, so the process is good, and I need to adapt this to run for all files.
I recorded the Macro and got the command ExportAsFixedFormat. Here is the line of code I used:
While the code runs fine and creats PDFs, it will not save bookmarks. A possible issue is when I manually use File > Save as PDF, I noticed the option to use bookmarks is not on the initial dialog; instead, later when choosing the filename, there is an Options button with a checkbox to create bookmarks. I cannot find a way to use the code and also to create bookmarks.
I searched online, and the Word version of ExportAsFixedFormat has an option for bookmarks, but I cannot find an equivalent parameter for Excel.
I'm using Excel 2010 and have Acrobat XI Standard.
I have about 50 Excel files that I want to turn into 50 individual PDF files. Each Excel file has many sheets, and I want each PDF file to contain all the sheets and have a bookmark for each sheet. The bookmark should be the same as the sheet name.
In summary, I wrote a macro that will save each file as a PDF with all the sheets, but it will not include bookmarks. Here is my process:
From Excel, I can open a file and click File > Save as Adobe PDF. This will save as PDF with bookmarks, so the process is good, and I need to adapt this to run for all files.
I recorded the Macro and got the command ExportAsFixedFormat. Here is the line of code I used:
Code:
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF,
Filename:=strNewFileName, Quality:=xlQualityStandard,
IncludeDocProperties:=False, IgnorePrintAreas:=False,
OpenAfterPublish:=False
While the code runs fine and creats PDFs, it will not save bookmarks. A possible issue is when I manually use File > Save as PDF, I noticed the option to use bookmarks is not on the initial dialog; instead, later when choosing the filename, there is an Options button with a checkbox to create bookmarks. I cannot find a way to use the code and also to create bookmarks.
I searched online, and the Word version of ExportAsFixedFormat has an option for bookmarks, but I cannot find an equivalent parameter for Excel.