Output Report to PDF for Preview

I am using the following code within a Button on a report
    'DoCmd.OutputTo acOutputReport, , "PDF Format (*.pdf)", Me.Report.Name & " " & Format(Now(), "ddmmyyyy-hhnnss")
OR
    DoCmd.OutputTo acOutputReport, , acFormatPDF

These work fine and save the file as predetermined name or specified name but the file is saved and not displayed in Adove Reader / Writer

If I do File - Save As PDF or XPS the file is previewed, I can then comment / edit with Writer and email to a recipient which is what I want to do

I know I can email the file via SendObject As etc... But I like to comment on the PDF first, underline points bold etc.....

Anyone any Ideas - Thanks - Perhaps a way to do the File - Save As PDF / XPS would suffice
Wizard_ITAsked:
Who is Participating?
 
Kelvin SparksConnect With a Mentor Commented:
DoCmd.OutputTo acOutputReport, , acFormatPDF, ,True
should preview it when complete

Kelvin
0
 
Wizard_ITAuthor Commented:
It doesn't - I would expect it to
Access 2007 Latest SP - No Runtime - Access PDF / XPS Addins installed and working OK
0
 
Kelvin SparksCommented:
?? I'll have to check my 2007 setup, currently running PC in 2003 mode, so can't go there at present.
0
 
Kelvin SparksCommented:
OK

I've checked this on a 2007 machine and it did open the pdf in Acrobat Standard (not Reader).

Can you check the file associations for your pc to see what program is associated with pdf's.

In my case it is the Acrobat Standard - but that is for another reason on that machine.

I'm running Access 2007 SP1 over Win XP, Access PDF / XPS Addins installed

I did notice a slight delay in the file opening after the pdf write.

Kelvin
0
 
Wizard_ITAuthor Commented:
Great

Works fine - I was being a plonker

I tied it earlier hardcoding the filename but forgetting the extension .pdf - assumed it would append the PDF - It was simply that

Thanks and enjoy the points
0
All Courses

From novice to tech pro — start learning today.