VB Excel Macro to Print and Close a PDF

I am using Acrobat X and Excel 2013 and have found code to open a PDF, fill in the fields from cells in a workbook.  Now I would like to know how (from the same module) to print the PDF and then close it without Adobe asking if I want to save it.
DavidH7470Asked:
Who is Participating?
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.

aikimarkCommented:
open the PDF in read-only mode
0

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
Karl Heinz KremerCommented:
You cannot learn how to program with and for Acrobat by picking up sample code on the Internet. There is only one source that will give you all the information, and that is the Acrobat SDK: http://www.adobe.com/devnet/acrobat.html

Take a look at the IAC (Interapplication Communication) section in the SDK documentation. You will find routines to print your document. To,prevent the save dialog, you need to reset the "dirty" flag. If that is set to false, Acrobat or Reader will not prompt you, and will just close the document.
0
DavidH7470Author Commented:
This all seemed to work from coding found on the internet.

Dim PDFDoc As AcroAVDoc
Set PDFDoc = CreateObject("AcroExch.AVDoc")
PDFDoc.PrintPagesSilent 0, 1, 2, True, True
PDFDoc.Close True
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.