Results 1 to 3 of 3
  1. #1
    alyon is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    89

    File PDF

    I have code to file a report as pdf, basically it's:
    DoCmd.OpenReport "File Temp", acViewPreview, , "[ID] = " & Me.[ID]
    DoCmd.OutputTo acOutputReport, "File Temp", acFormatPDF, strPath + strMyName, False
    DoCmd.Close acReport, "File Temp"
    and it works great... gets the report where it needs to go, makes a folder if there isn't one (there's a little more code than I posted above).
    But the problem is in the above code... I need it to file as a PDF.. I know acFormatPDF is what that means. However, when you go into the file, you must click the report (and yes, it says pdf file as its file type), choose open with-Adobe, and only then will it open as a "legit PDF". Is it possible that when it goes to file it is saved as an adobe pdf?

    Thanks,


    alyon

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Does the file save with the .pdf extension on the name? If not try:

    DoCmd.OutputTo acOutputReport, "File Temp", acFormatPDF, strPath & strMyName & ".pdf", False
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alyon is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    89
    Worked like a charm! Perfect! Thank you so much!!

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

Similar Threads

  1. Replies: 10
    Last Post: 03-04-2012, 12:17 AM
  2. could not find file due split pasted file
    By alex_raju in forum Access
    Replies: 1
    Last Post: 07-18-2011, 11:27 AM
  3. Replies: 1
    Last Post: 09-27-2010, 10:10 AM
  4. Replies: 2
    Last Post: 03-02-2010, 12:02 PM
  5. Upload file inside .mdb database file
    By havish in forum Access
    Replies: 0
    Last Post: 07-30-2008, 07:35 AM

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