By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

converting reports to PDF

P: 18
This is a sort of follow on from my previous posts, I am trying to convert the 30 odd files to PDF (they all form a complete single report at the end), i can do a loop to do this but its slow and click intensive, for each report in the loop below, the save as dialog appears and also acrobat opens and shows the file, is there a way to make this faster, ie, removing the save as dialog and not showing the acrobat preview? or alternatively does anyone know how to contol the acrobat printer ?

Expand|Select|Wrap|Line Numbers
  1. Sub cmdPDF()
  2. MsgBox ("still under test")
  3. DoCmd.RunCommand acCmdSaveRecord
  4. On Error GoTo Err_cmdPrintRep_Click
  5.     Dim stDocName As Variant
  6.     Dim i As Variant
  7.     Dim stLinkCriteria As String
  8.     Dim tmpPrinter As Printer
  9.     Dim FileName As String
  10. Set tmpPrinter = Application.Printer 'Default Printer
  11. Set Application.Printer = Application.Printers("Adobe PDF")     'Change the application printer to adobe
  12. FileName = "C:\AdobePDF\"
  13. stDocName = Array("Page1", "Page1a", "Page2", "Page3", "Page4", "Page5", "Page6", "Page7", "Page8", _
  14.                 "Page8a", "Page9", "Page9a", "Page10", "Page11", "Page12", "Page13", "Page14", _
  15.                 "Page15", "Page15a", "Page16", "Page17", "Page18", "Page18a", "Page19", _
  16.                 "Page19a", "Page20", "Page20a", "Page21", "Page21a", "Page22", "Page23", "Page24", _
  17.                 "Page25", "Page26", "Page27", "Page27a", "Page27b", "Page28", "Page29", "Page30")
  18. stLinkCriteria = "[InspectionID] =" & Forms![Booking Form]![InspectionID]
  19.  
  20.     For Each i In stDocName    
  21.     DoCmd.OpenReport i, acNormal, , stLinkCriteria      
  22.     DoCmd.Close acReport, i
  23.     Next i
  24.  
  25. Set Application.Printer = tmpPrinter 'printer back to default
  26.  
  27. Exit_cmdPrintRep_Click:
  28.     Exit Sub
  29.  
  30. Err_cmdPrintRep_Click:
  31.     MsgBox ("Report Does not Exist")  'Err.Description
  32.     Resume Exit_cmdPrintRep_Click
  33.  
  34. End Sub
as you can see its essentially the same routine as the report one (moving the stlinkcriteria as suggested by earlier posts (thanks) but with printer changed to Acrobat at the start and reverted back to default printer at the end.
Jun 2 '07 #1
Share this Question
Share on Google+
6 Replies


P: 18
A follow on from above, Ive no switched to testing PRIMO PDF, which gives me less keystrokes and nothing much on screen, so less intensive than previous try, has anyone had experience of PRIMO PDF, mostly I would like to automate pressing the enter key to get rid of the primo print dialog. or stop it from appearing, that will make the whole thing automatic. or do i dream ....
thanks
Jun 2 '07 #2

NeoPa
Expert Mod 15k+
P: 31,494
As this is essentially third-party software, I suggest you may like to check on their web site for help in this matter. I have no experience with PRIMO and I doubt many here do. I expect the vendors have covered this area many times before though.
Good luck.
Jun 2 '07 #3

P: 18
As this is essentially third-party software, I suggest you may like to check on their web site for help in this matter. I have no experience with PRIMO and I doubt many here do. I expect the vendors have covered this area many times before though.
Good luck.
As a tidy up to this, I have now gone on to use eDocPrinter PDF pro, this is good because it also has its own pdf merge called Drag2PDF, these two together have solved the problem and have also removed the need for the full Adobe Acrobat to be put on other machines that the database is using, they only need the reader as the Drag2PDF does the merging of my 30 reports into one with ease.

thanks for the suggestions and help to the end result. ta
Jun 23 '07 #4

NeoPa
Expert Mod 15k+
P: 31,494
Sounds like a good solution. Thanks for posting it :)
Jun 23 '07 #5

puppydogbuddy
Expert 100+
P: 1,923
Sounds like a good solution. Thanks for posting it :)
Adrian,

Thought I would mention this link to Tony Toews web site in case you have not seen it. I've used Lebans method and everything that Tony said is true.

http://www.granite.ab.ca/access/pdffiles.htm
Jun 24 '07 #6

NeoPa
Expert Mod 15k+
P: 31,494
Looks like a good resource. Nice one :)
Jun 24 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.