Email with Attachment

TBC

Registered User.
Local time
Today, 13:32
Joined
Dec 6, 2010
Messages
145
Hello,

I have a report titled “Monthly ABC Report”

I use the following code to send out the email.
How do I attached the “Monthly ABC Report” to my code below so that it will attach when I send out this email and change it to a PDF?

Code:
Option Compare Database

Sub Mail_Outlook_With_Signature_Html_1()
' Working in Office 2000-2013
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    strbody = "Please find attached last month's Regions Monthly Report along with #ACCNTS and #GUARS.<br>" & _
              "<br><br>" & _
              "Regions Monthly Presumptive #ACCNTS Export.<br>" & _
              "Regions Monthly Presumptive #GUARS Export.<br>" & _
              "<br><br>" & _
              "Thank you<br>"

On Error Resume Next
 
         

    With OutMail
        .Display
        .To = "
        .CC = "
        .BCC = ""
        .Subject = "Regions Monthly Report"
        .HTMLBody = strbody & "<br>" & .HTMLBody
        .Send
      
    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub
 
Have a quick search of the forum, this question has been asked several times in the last week or so. My forum name is in a few of the threads.
 

Users who are viewing this thread

Back
Top Bottom