Solved

Stopping a PDF file from opening when created

Posted on 2013-05-30
2
447 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

688 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