Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    exporting pdf file (Access 2007 SP1)

    I have successfully used the following code to export a report as an attachment to an email for easy sending. I have been exporting the report in Snapshot Viewer format. I would like to begin using the pdf format. What syntax would I use to create a pdf report via code, the part in red is what I believe needs to be changed. I can manually export the report by right clicking the report name and selecting export, then selecting the PDF or XPS option, but I would rather have it done automatically through code. Any suggestions.

    <pre> DoCmd.SendObject acReport, "rptMachineRunRates_AX_MX6000_ByShift", _
    <font color=red>"SnapshotFormat(*.snp)"</font color=red>, "", "", "", _
    "American Express Daily MX6000 Report " & strDateMX6000, _
    "Please contact Steve at x1234 with questions or issues.", False, ""
    </pre>


  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: exporting pdf file (Access 2007 SP1)

    Have you tried replacing "SnapshotFormat(*.snp)" with acFormatPDF ?

  4. #3
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: exporting pdf file (Access 2007 SP1)

    I get a message reading "The format in which you are attempting to output the current object is not available".

    However, I have included a screen shot of the options when manually exporting a file.
    Attached Images Attached Images

  5. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: exporting pdf file (Access 2007 SP1)

    I don't have Access 2007, it was just a guess (although based on a Google search). I hope that someone else can help you better.

  6. #5
    2 Star Lounger
    Join Date
    May 2001
    Location
    Omaha, NE USA, Nebraska, USA
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: exporting pdf file (Access 2007 SP1)

    I played around a little more and found this syntax will work.

    <pre>PDF Format(*.pdf)</pre>


    I appreciate your efforts

Posting Permissions

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