Some users always move all the recipients except the original sender to “CC” field when using “Reply All” in Outlook. This article will introduce a method to automate the movement with Outlook VBA.
By default, when you select “Reply All” to reply an email, all the recipients who was originally in “To” field will be still placed in the “To” field in the replying mail. However, many users would like to move all the recipients to the “CC” field with only the original sender in “To” field. In response to this requirement, here we’ll expose a piece of VBA code, which can realize it automatically.
Auto Move All Recipients except Original Sender to “CC” Field in “Reply All”
- In the first place, launch your Outlook program.
- Then in the main Outlook window, press “Alt + F11” key buttons.
- Next you will enter the Outlook VBA editor.
- Subsequently, you ought to find and open the “ThisOutlookSession” project.
- Later you need to copy and paste the following VBA codes into this project window.
Public WithEvents objExplorer As Outlook.Explorer Public WithEvents objInspectors As Outlook.Inspectors Public WithEvents objMail As Outlook.MailItem Private Sub Application_Startup() Set objExplorer = Outlook.Application.ActiveExplorer Set objInspectors = Outlook.Application.Inspectors End Sub Private Sub objExplorer_Activate() On Error Resume Next If objExplorer.Selection.Item(1).Class = olMail Then Set objMail = objExplorer.Selection.Item(1) End If End Sub Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector) If Inspector.CurrentItem.Class = olMail Then Set objMail = Inspector.CurrentItem End If End Sub Private Sub objMail_ReplyAll(ByVal Response As Object, Cancel As Boolean) Dim objReplyAll As Outlook.MailItem Dim objRecipient As Outlook.recipient Dim objCCRecipient As Outlook.recipient Dim strSender As String Set objReplyAll = objMail.ReplyAll strSender = objMail.SenderEmailAddress For Each objRecipient In objMail.Recipients 'Exclude yourself If objRecipient.Address <> "youremail@datanumen.com" Then 'Add the recipients as CC recipients Set objCCRecipient = objReply.Recipients.Add(objRecipient.Address) objCCRecipient.Type = olCC End If Next 'Keep original sender in To field objReplyAll.To = strSender objReplyAll.Display Cancel = True End Sub
- After that, you should sign this macro and then change your Outlook macro settings to permit digitally signed macros.
- Eventually you can restart your Outlook to activate the new VBA project.
- From now on, every time you reply emails using “Reply All”, you will see that all the recipients have been moved to “CC” field with only the original sender in “To” field.
Don’t Panic in Case of PST Corruption
If your PST file contains a lot of your valuable data, such as client information and so on, once your PST file gets corrupt, you must become worried. However, if you have backed up your file recently, you will never panic. The backups will enable you to get back your damaged Outlook data with effortless ease. But if there is no such backup, you still can use a potent recovery tool, such as DataNumen Outlook Repair.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair sql and outlook repair software products. For more information visit www.datanumen.com