Results 1 to 2 of 2
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question OutputTo PDF???

    I want to simply export a report to PDF format. I know you can do it by clicking the "PDF or XPS" button under the "Data" section of the ribbon. How can you do this programmatically? I tried the below code but I keep getting Run-time error '2501'.

    Code:
    DoCmd.OutputTo acOutputReport, "rptDivBreakdown", "*.pdf", vExportPath


  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Solved....Didn't add my file name to the export path....GENIUS!!!

    Code:
    DoCmd.OutputTo acOutputReport, "rptDivBreakdown", "*.pdf", vExportPath & "\rptDivBreakdown.pdf"

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

Similar Threads

  1. OutputTo Excel
    By smikkelsen in forum Access
    Replies: 0
    Last Post: 03-08-2011, 05:15 PM
  2. Export to Excel with OutputTo
    By kadara in forum Import/Export Data
    Replies: 3
    Last Post: 11-15-2010, 11:35 PM
  3. Replies: 0
    Last Post: 11-17-2009, 02:35 PM

Tags for this Thread

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