How do I create PDF with password protection using Excel/VBA
Copy link to clipboard
Copied
I have a program that creates Excel files and converts them to PDF (Export As Fixed Format). Now I need to add password on open to the PDF files. How do I do that? Any help would be recommended.
Also, on a similar note printing word to pdf has encrypt with password feature but printing excel to pdf does not. Highly recommend you add this feature to PDF.
Copy link to clipboard
Copied
Nothing to add. The feature is available in PDF.
Copy link to clipboard
Copied
Thanks Bernd,
Sorry what I meant to ask was how to save an excel file as PDF With Password Protection using VBA macros. I know how to save as PDF without password protection as feature is available but cannot see an option to save with password protection.
Any suggestion?
Copy link to clipboard
Copied
Acrobat has no interface for this.
Copy link to clipboard
Copied
It does. When you use the PDFMaker plugin to convert an Office file to PDF you can specify a file-open or file-edit password directly.
These settings can be found under the Security tab of the Acrobat PDFMaker Preferences dialog:
I can't say for sure whether or not you can do all of that using a VBA macro, though, but Acrobat can certainly do it.
Copy link to clipboard
Copied
Do I need the full Acrobat Professional for PDFMaker and Password protection feature or is Adobe Reader enough. Reason I ask is that when I open an Excel file and save as PDF I do not see the encrypt with password option, however from Word when I save as PDF I see the encrype with password option. Any advice?
Copy link to clipboard
Copied
Looks like that Microsoft doesn't add this feature to Excel.
Copy link to clipboard
Copied
Sorry, I mean no PROGRAMMING Interface. Indeed, there is no supported API for scripting PDFMaker at all.
Copy link to clipboard
Copied
Reader is just a reader. To make files or set security you need Acrobat (paid for).
I guess from your question you're creating a PDF eithout using any Adobe product... So it's hard to answer what features you have, or respond to your suggestion.

