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. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: exporting pdf file (Access 2007 SP1)

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

  3. #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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 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.

  5. #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
  •