Results 1 to 3 of 3

Thread: Filename Prompt

  1. #1
    Join Date
    Apr 2002

    Unanswered: Filename Prompt

    I am printing fifteen different reports to PDF files. Everytime I press a button on the form to print, it prompts me for a filename.

    Is there a way to attach the filename to the button (or something else) so that, when I press the button, it automatically prints to that file (no prompt)?

    Thanks for the help.

  2. #2
    Join Date
    Apr 2002

    You may try using the SendKeys statement.
    A bit rude, but it will send keys to the next appearing screen.
    Set the pdf-printer as the default windows printer.

    I once used code that looked like:
    ReportName = "D:\YourDir\YourReportName.pdf"
    SendKeys ReportName & "~"
    DoCmd.OpenReport "Report", acViewNormal

    Can't remember why the ~ is in there, but give it a try.
    Also look in the help files for further SendKeys options.


  3. #3
    Join Date
    Mar 2002
    Here is a website of a company that provides software that works very well with the PDFWriter. You can download and try the software free for 30 days, but then must pay.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts