From excel VBA, I need to write a macro to automatically save workbooks as PDF files with password stored in an excel shee .

I have excel 2010, adobe acrobat 9. I wish to write a VBA macro to automatically save excel workbooks as PDF with password. Can you assist?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I have read some articles from Internet, it seems that we got 2 approaches:

1. use a PDF library to create the PDF from Excel with password, like PDFCreator:

Using PDFCreator with security options set

2. use Excel built-in method to export the Excel into PDF, and then use a 3rd party tool to add in the password.

Step 1:
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\yourFolder\test.pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False

Step 2:
Using tools like: pdftk at:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.