Solved

Output Report to PDF for Preview

Posted on 2008-10-20
5
895 Views
Last Modified: 2013-11-28
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
0
Comment
Question by:Wizard_IT
  • 3
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
ID: 22756148
DoCmd.OutputTo acOutputReport, , acFormatPDF, ,True
should preview it when complete

Kelvin
0
 

Author Comment

by:Wizard_IT
ID: 22756169
It doesn't - I would expect it to
Access 2007 Latest SP - No Runtime - Access PDF / XPS Addins installed and working OK
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 22756197
?? I'll have to check my 2007 setup, currently running PC in 2003 mode, so can't go there at present.
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
ID: 22756282
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
 

Author Comment

by:Wizard_IT
ID: 22756630
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

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

15 Experts available now in Live!

Get 1:1 Help Now