Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Choose filename and folder when saving report as PDF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sietske - 21 Jan 2008 11:56 GMT
Dear all,

My form contains a button to save a report to PDF. However, the future
user can not choose the folder the pdf is placed, nor the name of the
pdf: this is all automatically generated; I assume this is done by the
pdf-printer.

Is there a way to make it possible that the folder and/or filename of
the pdf can be chosen by the user?

I was thinking of using fHandleFile or acSysCmd, but I definitely
could use some hints to help me on the way somewhat more.

Best regards,
Sietske

***************************************************************************­***
My current code (with help of accarch131.zip on
http://www.helenfeddema.com/access.htm)
looks like this:

  'Remember the standard printer
  Set prt = Application.Printer
  Debug.Print "Current default printer: " & prt.DeviceName

  'Make the PDF-printer temporary the standard printer
  Application.Printer = Printers("PDFCreator")

  'Print the report to the PDF-printer
   Dim strDocName As String
   Dim strWhere As String
   strDocName = "rptConsult"
   strWhere = "[Id_Consult]=" & Me!Id_Consult
  DoCmd.OpenReport strDocName, acViewNormal, , strWhere

  'Make the original printer standard again
  Application.Printer = prt

***************************************************************************­***
Allen Browne - 21 Jan 2008 12:08 GMT
Please don't post multiple message to different groups asking the same
question.

See:
   Call Windows Browse for Folder Dialog box
at:
   http://www.mvps.org/access/api/index.html

Signature

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.

> Dear all,
>
[quoted text clipped - 34 lines]
>   Application.Printer = prt
> ***************************************************************************­***
Sietske - 21 Jan 2008 12:28 GMT
Thanks for the hint, I will give it a try!

Please excuse me for the multiple message. I didn't realise that this forum
(which I visit from www.microsoft.com) was a newsgroup too. I will stick to
just one group in the future.  

> Please don't post multiple message to different groups asking the same
> question.
[quoted text clipped - 42 lines]
> >   Application.Printer = prt
> > ***************************************************************************­***
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.