tjdickinson
Board Regular
- Joined
- Jun 26, 2021
- Messages
- 61
- Office Version
- 365
- Platform
- Windows
My question is hopefully rather simple, but I'm relatively new to VBA and I know nothing about Acrobat API. After spending the better part of the past two days scouring the web for an answer, I've only found long-outdated results (like like this post from 2016 based on this blog from 2009 and this post from 2009) which are only partially relevant (most of the results dealt with merging two already existing PDFs), minimal documentation, and broken reference links.
I've noticed that @John_w has answered a lot of questions about Acrobat API, so I'm hoping that they might be able to help here. But of course, anyone's help is appreciated.
What I have so far is really just the beginning:
After that, I'm totally lost. It seems like it should be straight forward, but I'm stuck. I really just need it to create the PDF with all worksheets in the active workbook, add a bookmark to each sheet (using the sheet name), and then save it to pdfNamePath.
Thank you in advance for any help you can give.
I've noticed that @John_w has answered a lot of questions about Acrobat API, so I'm hoping that they might be able to help here. But of course, anyone's help is appreciated.
What I have so far is really just the beginning:
VBA Code:
Sub exportPDF(pdfExportLoc)
Dim pdfNamePath as String
pdfNamePath = pdfExportLoc & "\" & left(activeworkbook.name, len(activeworkbook.name)-5) & ".pdf" ' adds the file name to the path and changes the extension
End Sub
After that, I'm totally lost. It seems like it should be straight forward, but I'm stuck. I really just need it to create the PDF with all worksheets in the active workbook, add a bookmark to each sheet (using the sheet name), and then save it to pdfNamePath.
Thank you in advance for any help you can give.