Solved

Stopping a PDF file from opening when created

Posted on 2013-05-30
2
445 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

696 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