Automatic send Email Attachments from Outlook Mail Email

This code will send email automatically from your Outlook E-mail, using VBA.

Here is code

Option Explicit
Sub EmbedImage()
    Dim objOutlook As Object
    Dim objMailItem As Object
    
    Set objOutlook = CreateObject("Outlook.Application")
    
    Set objMailItem = objOutlook.CreateItem(0)
    
    With objMailItem
        .To = "johnsmith@gmail.com"
        .Subject = "Misc..."
        .Attachments.Add "c:\users\domenic\desktop\sample.jpg" 'change the folder and filename accordingly
        .HTMLBody = "[p]This is the first paragraph...[/p]" & _
            "[img src=""cid:sample.jpg""]" & _
            "[p]This is the second paragraph...[/p]" & _
            "[p]Thank you![/p]"
        .Display
    End With
    
End Sub

Note that the above code displays the email, instead of sending it. To send the email, replace...

.Displaywith

.Send