From: Arno R on
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


From: Jörn Bosse on
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
From: Jon Lewis on
Try this:

DoCmd.RunCommand acCmdPublishFixedFormat

Jon

"Arno R" <arracomn_o_s_p_a_m(a)planet.nl> wrote in message
news:4c29e9ad$0$14124$703f8584(a)textnews.kpn.nl...
> 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
>


From: Arno R on
Thanks,
Exactly what I needed...
I only needed to search for the value of the constant to avoid a compile error in Access2003

I needed the functionality on a custom toolbar.
Now I can code in Access2003 and distribute the app with the Access 2007 Runtime.

Regards, Arno R


"Jon Lewis" <jon.lewis(a)cutthespambtinternet.com> schreef in bericht news:bumdnXyT4ZDbmLfRnZ2dnUVZ8u2dnZ2d(a)bt.com...
> Try this:
>
> DoCmd.RunCommand acCmdPublishFixedFormat
>
> Jon
>
> "Arno R" <arracomn_o_s_p_a_m(a)planet.nl> wrote in message news:4c29e9ad$0$14124$703f8584(a)textnews.kpn.nl...
>> 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
>>
>
>



From: Arno R on
Thanks,
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.

But this code option is very useful also.

Regards, Arno R


"J�rn Bosse" <joernbosse(a)gmx.de> schreef in bericht news:88uec2FqlsU1(a)mid.uni-berlin.de...
> 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