473,387 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

converting reports to PDF

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
6 2304
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
32,556 Expert Mod 16PB
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
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
32,556 Expert Mod 16PB
Sounds like a good solution. Thanks for posting it :)
Jun 23 '07 #5
puppydogbuddy
1,923 Expert 1GB
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
32,556 Expert Mod 16PB
Looks like a good resource. Nice one :)
Jun 24 '07 #7

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

Similar topics

2
by: Rosy Moss | last post by:
I am in the process of cleaning up a database that our company uses to track jobs, time and expense, and customer information. We are running Windows 2000 Server with approximately 20 terminals...
7
by: RCS | last post by:
Okay, a rather 'interesting' situation has arisen at a place I work: I need to convert a database from Access to something that can be used over the web. I am currently maintaining and...
0
by: Bob Alston | last post by:
Looking for the best resources for converting an existing Access 2003 database to the web. Have an application that has many forms and reports, with sub-forms and sub-reports and liberal use of...
2
by: Rod | last post by:
We've got an old VB6 application we wrote years ago, that we're working on converting parts of, to an ASP.NET application. So far, the work is going well. Now I'm looking at trying to convert...
6
by: Glenn | last post by:
Hi, I have a fairly urgent requirement to generate PDF documents from within a C# .NET component, based on generated HTML reports. These HTML reports contain images and use CSS styles...
8
by: moondaddy | last post by:
I need to convert a byte array to a string and pass it as a parameter in a URL and then convert it back to the original byte array. However, its getting scrambled in the conversion. In short,...
2
by: Christine.Misseri | last post by:
Hi all, I'm sure someone knows about this problem. I have an Access database designed in Access 2000, connected to an ORACLE 8i back end. On the ORACLE side I have stored procedures, triggers...
15
by: dm1608 | last post by:
We have a number of COBOL programs, and some were currently developing, that simply read TEXT based reports and scrap the reports for various information. I'm curious to know if anyone has...
4
by: Bob Alston | last post by:
Anyone have experience with converting an access app from Jet database to Mysql? I am specifically looking for any changes I would have to make to my access forms, queries, modules, vba code, etc....
2
by: doozer1979 | last post by:
Hello, I'm having a bit of difficulty transforming xml elements into attributes. I want to loop through all of the <person> elements in the document and turn all of its child elements into...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.