[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

How print report to pdf and have it open right away on screen

I'm having a problem with image resolutions (another topic) and want to try a work-around.

Is the a way via VBA to from a command button on a form, print a report to a pdf and then have that pdf report appear on the screen right away?

--Steve
0
SteveL13
Asked:
SteveL13
1 Solution
 
akbCommented:
I'm not sure about using VBA however there is another way to do it. Install PDFCreator from SourceForge. It is open source and free. Set PDFCreator as default printer. Print a document and select Options. Go to Auto-save and tick Auto-save and "After auto-saving open the document...".
0
 
Rey Obrero (Capricorn1)Commented:
place this codes in the click event of a button

private sub button_click()

DoCmd.OutputTo acOutputReport, "rptTable2", acFormatPDF, CurrentProject.Path & "\myReport.pdf"

FollowHyperlink CurrentProject.Path & "\myReport.pdf"


end sub
0
 
SteveL13Author Commented:
This worked perfectly.  The only thing is it seems to open the pdf at 105%.  I wish it was about 75%.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now