View Full Version : Access Report Custom Renaming


sundarsree
06-10-2010, 04:04 AM
Hi all....
I am printing a report from access in to a PDF document using a freeware called Cute PDF Writer. My requirement is to set the PDF name as a custom one taken from the report and should be saved. In present scenario it is taking the report name as the DEFAULT name. for example
my report name is SALES and when i print the report its coming default as SALES.pdf. But i need Alan Bakes.pdf where Alan Bakes is the organisation name which is there inside the report as a textbox.
Kindly help me to solve this issue.

Thanks and Regards..
Sreekanth:confused:

vbaInet
06-10-2010, 04:05 AM
What version of Access are you using?

Welcome to AWF by the way :)

sundarsree
06-10-2010, 04:10 AM
Access 2003

vbaInet
06-10-2010, 04:23 AM
How is the pdf created? By calling a function provided by this tool or by running the software?

sundarsree
06-10-2010, 04:43 AM
actually i have set the default printer as the CUTE PDF Writer. and when i uses the print button it directly takes the printer as CUTE PDF writer and writes int o PDF

vbaInet
06-10-2010, 05:02 AM
If you can't do it via the software interface then you would have to rename the pdf document in code.

Use the Name statement:
Name oldpathname As newpathname

OR

Use Shell() to rename the file.