ReplyRecipients

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

I would like a macro which I can assign to a button which is available for
every new Email message created, which sets a different reply to address.

I have no idea of the elements of the Outlook object, so any assistance with
the objects which require manipulating would be apprecaited.

P
 
Map a button to this macro; just change the e-mail address in the code:

Sub SetReplyToAddress()
Dim objMail As Outlook.MailItem
Dim objReplyRecips As Outlook.Recipients

If Application.ActiveInspector Is Nothing Then Exit Sub

Set objMail = Application.ActiveInspector.CurrentItem
Set objReplyRecips = objMail.ReplyRecipients
Do Until objReplyRecips.Count = 0
objReplyRecips.Remove (objReplyRecips.Count)
Loop

objReplyRecips.Add "(e-mail address removed)"

Set objMail = Nothing
Set objReplyRecips = Nothing
End Sub
 
Back
Top