Solved

Stopping a PDF file from opening when created

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now