Remove an Address from Reply All

Last reviewed on October 2, 2014   —  1 comment

reply-allWhen a mailbox receives messages for more than one address, such as messages forwarded from another account, Outlook may include the address in the recipients list when you hit Reply All.

I have an issue with reply all in outlook 2013. Since I use gmail, I effectively have 2 email addresses, with the same account (@gmail.com, @googlemail.com) If I reply all to an email sent to @googlemail.com, I get cc'd on the reply as outlook doesn't recognize the address as the same as the account its set up with.

This isn't a new problem: Outlook has always had problems identifying which address is yours when it doesn't match the address on your account in Account Settings.

To remove the address, use a macro that runs when you trigger the Reply All command.

Paste the following macro in ThisOutlookSession. To test it without restarting Outlook, click in the Startup macro and press F5 or the Run button.

This macro will be triggered by the Reply All button in the Reading Pane but the reply opens in a new window.


Option Explicit
Private WithEvents oExpl As Explorer
Private WithEvents oItem As MailItem
Private bDiscardEvents As Boolean
'http://slipstick.me/44b0w
  
Private Sub Application_Startup()
   Set oExpl = Application.ActiveExplorer
   bDiscardEvents = False
End Sub
  
Private Sub oExpl_SelectionChange()
   On Error Resume Next
   Set oItem = oExpl.Selection.Item(1)
End Sub
  
' Reply
Private Sub oItem_ReplyAll(ByVal Response As Object, Cancel As Boolean)
        
   Cancel = True
   bDiscardEvents = True
   
   Dim oReply As MailItem
   Set oReply = oItem.ReplyAll
    
    Dim recips  As Outlook.Recipients
    Dim i As Long

Set recips = oReply.Recipients

  For i = recips.Count To 1 Step -1
  If LCase(recips.Item(i).Address) = "alias@slipstick.com" Then
     recips.Remove i
     End If
    Next
      
 oReply.Display
        
   bDiscardEvents = False
Set oItem = Nothing
End Sub

How to use the macro

First: You will need macro security set to low during testing.

To check your macro security in Outlook 2010 or 2013, go to File, Options, Trust Center and open Trust Center Settings, and change the Macro Settings. In Outlook 2007 and older, it’s at Tools, Macro Security.

After you test the macro and see that it works, you can either leave macro security set to low or sign the macro.

Open the VBA Editor by pressing Alt+F11 on your keyboard.

To use the macro code in ThisOutlookSession:

  1. Expand Project1 and double click on ThisOutlookSession.
  2. Copy then paste the macro into ThisOutlookSession. (Click within the code, Select All using Ctrl+A, Ctrl+C to copy, Ctrl+V to paste.)

More information as well as screenshots are at How to use the VBA Editor

More Information

See E-Mail: Remove recipients before sending code sample by Outlook Developer MVP Michael Bauer. Michael's code checks for more than one address.

Written by

Diane Poremsky
A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Please post long or more complicated questions at Outlookforums.

One response to “Remove an Address from Reply All”

  1. George Aggelopoulos

    I would like to combine the above script with the one that changes the email account for sending an email. I would like to happen both at the same time with one script since I have already changed the appropriate button to run the script below:
    -(Public Sub New_Reply()
    -Dim oAccount As Outlook.Account
    -Dim oMail As Outlook.MailItem
    -For Each oAccount In Application.Session.Accounts
    -If oAccount = "the_email_account_name" Then
    - Set oMail = Application.ActiveExplorer.Selection(1).Reply
    - oMail.SendUsingAccount = oAccount
    - oMail.Display
    -End If
    -Next
    -End Sub)

    Thanks in advance

Leave a Reply

If the Post Coment button disappears, press your Tab key.