• exporting pdf file (Access 2007 SP1)

    Author
    Topic
    #451624

    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.

        DoCmd.SendObject acReport, "rptMachineRunRates_AX_MX6000_ByShift", _
            "SnapshotFormat(*.snp)", "", "", "", _
            "American Express Daily MX6000 Report " & strDateMX6000, _
            "Please contact Steve at x1234 with questions or issues.", False, ""
    
    Viewing 0 reply threads
    Author
    Replies
    • #1112325

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

      • #1112334

        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.

        • #1112345

          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.

          • #1112355

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

            PDF Format(*.pdf)

            I appreciate your efforts

    Viewing 0 reply threads
    Reply To: exporting pdf file (Access 2007 SP1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: