• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Save as PDF

Kmahraz

Member
Hey Guys,
Looking for some help to change the code below from send email to Save as PDF.
Any help will be greatly appreciated.
Regards,
K
Code:
Sub SendEMail(WHOTOemail As String, myreport As String, myquery As String, mysubject As String, mytext As String)
On Error GoTo SendEMail_Err

Dim output As Long

    DoCmd.OpenReport myreport, acViewReport, "", myquery, acNormal  'Open the report using the query defined above
        DoCmd.OutputTo acOutputReport, myreport, "PDFFormat(*.pdf)", "C:\Users\krkoch\Desktop\& rs!WHOTO.pdf", False, "", , acExportQualityPrint
        'DoCmd.SendObject acReport, myreport, "PDFFormat(*.pdf)", WHOTOemail, "", "", mysubject, mytext, False, ""
    DoCmd.Close acReport, myreport
   
SendEMail_Exit:
    Exit Sub

SendEMail_Err:
    MsgBox Error$
    Resume SendEMail_Exit

End Sub
 
Back
Top