Solved

Stopping a PDF file from opening when created

Posted on 2013-05-30
2
442 Views
Last Modified: 2013-05-30
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.
0
Comment
Question by:geeta_m9
2 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 400 total points
ID: 39207848
Try setting the last argument to False.  Doesn't work with all apps though.

Jim.
0
 

Author Comment

by:geeta_m9
ID: 39207868
It worked! Thanks.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question