Outlook Reply or ReplyAll to an Email
To simply Reply or ReplyAll selected messages try the following.
Option Explicit
Sub ReplyMSG()
Dim olItem As Outlook.MailItem
Dim olReply As MailItem ' Reply
Dim olRecip As Recipient ' Add Recipient
For Each olItem In Application.ActiveExplorer.Selection
Set olReply = olItem.ReplyAll
Set olRecip = olReply.Recipients.Add("Email Address Here") ' Recipient Address
olRecip.Type = olCC
olReply.HTMLBody = "Hello, Thank you. " & vbCrLf & olReply.HTMLBody
olReply.Display
'olReply.Send
Next olItem
End Sub
To hide the recipient use BCC Example
olRecip.Type = olBcc
To add multiple recipient just add
Set olRecip = olReply.Recipients.Add("Email Here")
Set olRecip = olReply.Recipients.Add("Email Here")
Set olRecip = olReply.Recipients.Add("Email Here")
With out Recipient try the following.
Option Explicit
Sub ReplyMSG()
Dim olItem As Outlook.MailItem
Dim olReply As MailItem ' Reply
For Each olItem In Application.ActiveExplorer.Selection
Set olReply = olItem.ReplyAll
olReply.HTMLBody = "Hello, Thank you. " & vbCrLf & olReply.HTMLBody
olReply.Display
'olReply.Send
Next olItem
End Sub