Stopping a PDF file from opening when created

I have written a program in Access VBA that creates a  PDF file from an Access report by issuing the following command:

DoCmd.OutputTo acOutputReport, "Master List", acFormatPDF, strStartDir & SessionNum & "_MasterList" & ".pdf", True

When it does this, however, the PDF file opens up in a new window as soon as it is created. I would like the file to be created without opening.

How can I accomplish this.

Thank you.
Who is Participating?
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor PresidentCommented:
Try setting the last argument to False.  Doesn't work with all apps though.

geeta_m9Author Commented:
It worked! Thanks.
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.

All Courses

From novice to tech pro — start learning today.