Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Reports in PDF

Status
Not open for further replies.

khwaja

Technical User
Aug 27, 2001
431
AU
I have written the following code to produce a report for each region in MS Excel. I need to modify the code to print the report as PDF, not Excel file. I cannot find any relevant command which I might use to amend the code. Could someone out there review the code and suggest relevant changes?

Sub PrintRegionalReports()

Dim Counter As Integer
Dim Region As Integer

For Counter = 0 To 15 Step 1

Region = Counter + 1
DoCmd.OpenReport " Strategic Plan", acViewNormal, , "[Region] = " & Region
DoCmd.OutputTo acOutputReport, "Strategic Plan", acFormatXLS, "C:\Strategic Plan Region - " _
& Region & ".xls"

Next

End Sub

Much appreciate your help.

Cheerrs
 
Hi.

I'm not up on any of the VBA coding stuff yet, so I can't give you the code you need.

However, as you know, when you create a .pdf from any Office app, you actually send it to the Acrobat Distiller or Acrobat PDF Writer, both of which are set up by Acrobat as printers when you installed the Acrobat product. You can only create a .pdf file this way, so if you don't have Acrobat installed (full version, not just the free reader) you cannot create .pdf files.

Hope this helps.

Howard.
 
Thanks Howard. I have a full version of writer and I use it quite extensively for Access reports. It's only the automation bit I am after by being able to have Access create the PDF file for me which I myself currently do - 15 times.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top