![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I need to print to (or publish) an Access report to pdf with code. This is a standard option with Access 2007 (SP2) BUT....I don't want to use the option on the ribbon for this. I need/want to code this. Any ideas? Thanks, Arno R |
#3
| |||
| |||
|
|
Hi all, I need to print to (or publish) an Access report to pdf with code. This is a standard option with Access 2007 (SP2) BUT....I don't want to use the option on the ribbon for this. I need/want to code this. Any ideas? Thanks, Arno R |
#4
| |||
| |||
|
|
Am 29.06.2010 14:40, schrieb Arno R: Hi all, I need to print to (or publish) an Access report to pdf with code. This is a standard option with Access 2007 (SP2) BUT....I don't want to use the option on the ribbon for this. I need/want to code this. Any ideas? Thanks, Arno R Hi, you could use: DoCmd.OutputTo acOutputReport, "repName", acFormatPDF if you have installed the "save as pdf and xps" addin for Office 2007 and you need a pdf creator. This function has some more arguments, to get more information, mark OutputTo and press F1. Regards Jörn |
#5
| |||
| |||
|
|
Try this: DoCmd.RunCommand acCmdPublishFixedFormat Jon "Arno R" <arracomn_o_s_p_a_m (AT) planet (DOT) nl> wrote Hi all, I need to print to (or publish) an Access report to pdf with code. This is a standard option with Access 2007 (SP2) BUT....I don't want to use the option on the ribbon for this. I need/want to code this. Any ideas? Thanks, Arno R |
#6
| |||
| |||
|
|
Hi all, I need to print to (or publish) an Access report to pdf with code. This is a standard option with Access 2007 (SP2) BUT....I don't want to use the option on the ribbon for this. I need/want to code this. Any ideas? Thanks, Arno R |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
sorry, link here: http://www.members.shaw.ca/AlbertKal...s/DownLoad.htm |
#9
| |||
| |||
|
|
Hi Albert, Thanks for the link, but I was NOT looking for an option on the ribbon... I needed the standard functionality to 'print as PDF' on a custom toolbar. This is meant for 2003 apps used by the Access2007 Runtime where I do NOT want to show the ribbon. |
#10
| |||
| |||
|
|
"Arno R" <arracomn_o_s_p_a_m (AT) planet (DOT) nl> wrote Hi Albert, Thanks for the link, but I was NOT looking for an option on the ribbon... I needed the standard functionality to 'print as PDF' on a custom toolbar. This is meant for 2003 apps used by the Access2007 Runtime where I do NOT want to show the ribbon. Ok, first keep in mind that office 2007 and 2010 don't "print" as pdf. The feature is native, and thus you save your document as a PDF. It only those PDF printers you install that work that way, not applications that have pdf support built in like office. So, just have your menu bar button call some VBA code to save the report as PDF. So, in a standard code module, you can place: Public Function SaveAsPDF() DoCmd.OutputTo acOutputReport, Screen.ActiveReport.name, acFormatPDF End Function so, then on your menu bar button, just set the on action to the above eg: =SaveAsPdf() So, it only one line of code in a module, and your menu bar button code can then call the above VBA code as per above. If you not talking about a custom menu bar button, then just call the code behind a button like: SaveAsPDF Albert D. Kallal (Access MVP) Edmonton, Alberta Canada kallal (AT) msn (DOT) com |
![]() |
| Thread Tools | |
| Display Modes | |
| |