Firstly, make sure you have the PDF add-in from Microsoft for A2007:
http://www.microsoft.com/downloads/d...displaylang=en
You can then code like this:
strDoc = "Report1"
strFile = "C:\temp\result.pdf"
DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Tony" <(E-Mail Removed)> wrote in message
news:4F225905-C518-4C62-A052-(E-Mail Removed)...
>I am using Access 2007. I want to add new menu item so that when clicked
>pdf
> file will be automatically created and stored in particular location, i.e.
> result.pdf to be stored in c:\temp directory. I know that it could be done
> by
> opening report, clicking on print and selecting pdf printer but I would
> like
> to make it working invisible for user. After clicking user will just
> received
> message advising that the pdf file was created and is ready for
> collection.
> Can this be done ? How ?
>
> Thanks for help.