Solved

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

Posted on 2006-11-24
7
201 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article describes some very basic things about SQL Server filegroups.
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
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…

773 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