Adds an addressee, a subject, and body text; applies the HTML format; sets the importance to high; and sends the message: : Email « Outlook « VBA / Excel / Access / Word






Adds an addressee, a subject, and body text; applies the HTML format; sets the importance to high; and sends the message:

 
Sub message()
    Dim myMessage As MailItem
    Set myMessage = Application.CreateItem(ItemType:=olMailItem)
    With myMessage
        .To = "yourName@yourSite.com"
        .Subject = "Preparation "
        .Body = "review."
        .BodyFormat = olFormatHTML
        .Importance = olImportanceHigh
        .Send
    End With
End Sub

 








Related examples in the same category

1.Send email for all records in an Access table
2.Send email by Using POP3
3.Display the information in a list of mails
4.Searching for Items
5.Sending a Message
6.Send a table through email
7.Using the CreateItem Method to Create Default Items
8.Send out an email by using the DoCmd.SendObject