Solved

Print to a specific pdf printer and save the file to a fixed location

Posted on 2006-11-24
7
199 Views
Last Modified: 2008-03-06
I have an event that currently opens a report in access. We then print this in pdf and save to a fixed loaction.

Can anyone advise on the code required to print this to a pdf printer (this is not my default printer) and to specify a network drive and save with date stamp.
0
Comment
Question by:Gallsey
  • 3
  • 2
7 Comments
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18008636
0
 

Author Comment

by:Gallsey
ID: 18018236
Sorry this did not help
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18019338
Here is a solution by puppydogbuddy that hinges on your requirements. How's your coding?

http://www.experts-exchange.com/Databases/MS_Access/Q_21764358.html?query=print+pdf+to+printer&topics=39
0
 

Author Comment

by:Gallsey
ID: 18083875
I tried what url but with no joy. Could you paste an example?

Thanks in advance
0
 
LVL 34

Accepted Solution

by:
jefftwilley earned 500 total points
ID: 18084841
Are you wanting to change your printer designation at the time you print the report?
Were you not able to open the link above? Or coulen't follow the contents?

A docmd.openreport is used in VBA to open a report. The report can be opened either as a preview, or "normal..in which case it will go directly to your default printer. Below is an example of this.

DoCmd.OpenReport "rpt_exc_design_conagro_tasklist", acViewPreview, , "[Oper#WorkCenter] ='" & ctlComboBox.ItemData(i) & "'"
   
docmd.outputto is used by vba to direct where an object can be output and in what format. Below is an example of this.

    DoCmd.OutputTo acOutputReport, "rpt_exc_design_conagro_tasklist", acFormatSNP, "P:\Planning Engineers\Weekly Reports\" & ctlComboBox.ItemData(i) & ".snp", False
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In today’s complex data management environments, it is not unusual for UNIX servers to be dedicated to a particular department, purpose, or database.  As a result, a SAS® data analyst often works with multiple servers, each with its own data storage…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

10 Experts available now in Live!

Get 1:1 Help Now