Cathy

MS Access has no built in function to output PDF files (i.e. acFormatPDF
does not exist).

I spent quite a long time figuring out a way to do this and now have a very
successful method.

You will need to download Win2PDF (www.daneprairie.com/) (the unlimited
trial stick a banner on you PDF so I actually bought the product).

Once you have Win2PDF installed you will have a printer in your printers
folder called Win2PDF, set this as the printer on the report you want to
output (i.e File > Page Setup > Page [Tab] > Use Specifi Printer .......).

Then use the following code in VBA to save you report as a PDF.

    SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName",
strTempFile
    DoCmd.OpenReport "Report Name"

strTempFile is the path and name of your intended PDF (i.e.
C:\PDFs\myfile.pdf)

This always works for me and I even combine this with a VBA SMTP component
to email bypassing Outlook.

Hope this helps.

David Pearson

-----Original Message-----
From: AccessDevelopers@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of robsims99
Sent: 07 September 2005 15:36
To: AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers] Re: Outputting PDF files from Access

I output reports from access using vba, after I've called the report, I use
this commad line:

DoCmd.OutputTo acOutputReport, FileName, acFormatRTF, FileLocation &
Left(FileName, 15) & ".rtf"

obviously if you're exporting .pdf files, you'll need to change the file
spec, as this is for .rtf files.

hope this helps.

Rob S.



--- In AccessDevelopers@yahoogroups.com, "cathyjupp" <[EMAIL PROTECTED]>
wrote:
> I have a need to save invoices from a sales order system in pdf form 
> for future reference.  I want to name these files by using vba
rather 
> than having the operator type in a name each time a pdf file is 
> created. I can't find any way of overriding the file name request
and 
> sending the file name - can anyone here help?
> Many thanks in advace.
> Cathy




------------------------ Yahoo! Groups Sponsor --------------------~--> Fair
play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links



 

=============================================================
The information in this Internet email is confidential and intended for the
sole use of the addressee(s). Copying, disclosure or re-use, in any way, of
the information contained in this email by anyone other than the addresse(s)
is unauthorised.  We accept no legal responsibility for the content of this
message. Any opinions or views presented are solely the responsibility of
the author and do not necessarily represent those of Siddall and Hilton Ltd. 
and any of their subsidiary companies. If you have read this email in error, 
please return it to the sender and remove from your system.
Siddall and Hilton Ltd. and any of their subsidiary companies may monitor the 
content of emails sent and received via its network for the purposes of 
ensuring its compliance with its policies and procedures.
=============================================================

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to