Results 1 to 5 of 5
  1. #1
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46

    Save a Report to a PDF file. Access 2007

    I have an application where it has become necessary to save reports as a PDF file.



    Our team has downloaded the add-in from Microsoft for saving to PDF. This file was an exe file
    and was just under 1K in size. We have installed it on a single machine and am working with the
    VBA code to save as a PDF via button click.

    The code we have generated is:

    DoCmd.OutputTo acOutputReport, , acPDFFormat, "C:\Documents and Settings\rpt_Student_ClassList.pdf", True

    One error is it does not like the format designation, acPDFFormat. We have tried several variations of the
    command line and have looked for several days to see what the alternative would be. Unfortunately, we
    have not been successful. Has anyone been successful in Implementing the add-in and getting the report to
    save to a PDF file?

    Also, We have modified the ribbon so we are not allowed to do this manually. We want the users to work
    from a button. Each report has a series of buttons to print, export, save and return to main menu. We are
    working on the save button at the moment.

    Thanks everyone.

    Jim

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    You're not specifying the report, and try acFormatPDF. This works for me:

    DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, "c:\AccessAp\" & rs!CustomerAccount & "_Statement.pdf"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46
    If the report is the active report then a report name is not required according to the literature.

    We will try your formatted statement and will let you know later.

    Thanks for taking the time to read the post.

    Jim

  4. #4
    casinc815 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2013
    Location
    Chicago, IL
    Posts
    46
    WORKS LIKE A CHARM! MANY THANK YOU'S!

    Jim

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Happy to help! I know you don't have to supply the name, but I don't like to leave it to chance.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Export report as RTF but save file name as .doc
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 06-06-2014, 03:16 AM
  2. Replies: 28
    Last Post: 05-25-2014, 04:01 PM
  3. Replies: 2
    Last Post: 05-01-2014, 01:31 PM
  4. Save a report file without preview
    By alex__ice in forum Reports
    Replies: 2
    Last Post: 04-16-2013, 08:13 AM
  5. Replies: 1
    Last Post: 01-24-2013, 11:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums