Send All Replies to one email address

December 21, 2009JPNo CommentsRate This Article


    If you have multiple email addresses set up in Outlook, you might want replies sent to only one address, regardless of which one you're sending from. To set this option manually, you click Options and type in the "Have replies sent to" box.

Options dialog

    To do it programmatically, use the ItemAdd event as follows:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim Msg As Outlook.MailItem

If IsMail(Item) Then
  ' set appropriate object reference so we can use
 ' Intellisense when code writing
 Set Msg = Item
Else
  ' skip processing
 Exit Sub
End If

Msg.ReplyRecipients.Add ("The name you should reply to")

End Sub

Function IsMail(ByVal itm As Object) As Boolean
  IsMail = (TypeName(itm) = "MailItem")
End Function

    The name you use should either be a resolveable name, or an email address.

About JP
I'm just an average guy who writes VBA code for a living. This is my personal blog. Excel and Outlook are my thing, with a sprinkle of Access and Word here and there. Follow this space if you want to learn more about VBA. Keep Reading »

↑ Scroll to top
Previous Post:

Next Post:

Speak Your Mind

Tell us what you're thinking...

Certain comments (including first-time comments) are subject to moderation and will not appear immediately. Please view the Comment Policy for more information. To post VBA code in your comment, use tags like this: [cc lang='vb']Code goes here[/cc].




Site last updated July 26, 2010 @ 8:14 pm