Email with Attachments:   Return to List

' Remember that a Reference is always to the Outlook (or other) Microsoft Library is needed for Automation.

With myItem
    ' The Address of the main message
    .To = Email_To_Addressee
    ' The address of any info copies
    .CC = Email_CC_Addressee
    ' Add the subject of the mail message
    .Subject = Email_Subject
    ' Create some body text
    .Body = Email_Body
    For j = 1 To UBound(AttachmentArray())
        If Len(AttachmentArray(j)) > 0 Then
            .Attachments.Add AttachmentArray(j)
            AttachmentArray(j) = ""' Blank when done
        End If
    Next
    'Send the mail message
    .Send
End With



Note to Webmaster