Print a report to PDF and name it

David Cochrane

New member
Local time
Today, 19:24
Joined
Oct 2, 2000
Messages
6
I am currently printing a report which is setup to a default printer of PDFWriter and the name is being pulled from some coding. I found the coding somewhere (forgotten where). The problem is that I am changing my computers over to Win2000 professional and the old way which worked on Win98 no longer works as it doesn't use the win.ini file the same way Win98 did.
Could anybody guide me in the right direction (either back to the website I got the original code from, or to a different way of doing it).

From what I can understand of the original code it wrote the filename to something in the win.ini then changed the printer to PDFWriter and then PDF Writer used the stored string to create the pdf file in that location with that name. Win 2000 doesn't use win.ini to store that information anymore but rather writes it to a Registry setting.

Thanks for any help in advance

David Cochrane

p.s. Sorry I posted this originally in the Form area.
 
Hi David
I can't offer any advice ... but I can tell you where you got this code from originally and you may be able to contact the authors from there.

The original coding comes from the Access Developers' Handbook - Ken Getz, Paul Litwin etc and an explanation of how to utilise it is available at:
http://www.mvps.org/access/reports/rpt0011.htm

If you get in touch with Dev Ashish via his Access Web you may have some luck.

HTH

Rich Gorvin
 
David I had a similar problem a while back. I approached this by noticing that the Adobe's default name was connected to the Caption of the report being generated. I use this information to manipulate the caption in code before the actual print to get the PDF writer to name the PDF file the caption I gave in code.

HTH
RDH

[This message has been edited by R. Hicks (edited 05-17-2001).]
 
Caption renaming

David I had a similar problem a while back. I approached this by noticing that the Adobe's default name was connected to the Caption of the report being generated. I use this information to manipulate the caption in code before the actual print to get the PDF writer to name the PDF file the caption I gave in code.

HTH
RDH

[This message has been edited by R. Hicks (edited 05-17-2001).]

Hi R. Hicks,
I'm facing a similiar problem. I need to rename the caption so that each attachment gets a unique ID.
Please help.
Thanks,
 
Got it

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.CopyObject , "rptOrder" & [InputID], acReport, "rptOrder"
stDocName = "rptOrder" & [InputID]
DoCmd.SendObject acReport, stDocName, acFormatRTF, "sudspark@gmail.com", "", , "New JDA Order", "New JDA Order"
DoCmd.DeleteObject acReport, "rptOrder" & [InputID]
 

Users who are viewing this thread

Back
Top Bottom