When you try to reply or forward emails via hitting “Reply”, “Reply All” or “Forward” button, there must be “RE” or “FW” prefix added in the front of the email subject. This article will tell you how to let Outlook auto remove them with VBA.
In our pervious article – “2 Methods to Forward Outlook Emails without “FW” Prefix in Subject”, you can get two workarounds to forward emails without “FW”. They are resending the emails and creating a “Forward” quick step respectively. It is obvious that both of them cannot permit you to auto remove “FW” if you utilize the normal “Forward” button in “Respond” group.
Therefore, by default, if you desire to remove the “RE” or “FW” prefix in subject when clicking “Reply”, “Reply All” or “Forward” button, you have to delete them manually every time. It will be quite troublesome. Luckily, you can use Outlook VBA to auto remove the specific words in the mail subject. Read on to achieve the detailed codes and steps.
Auto Remove the Prefix “FW” or “RE” when Forwarding or Replying Emails
- For a start, launch Outlook and head to “Developer” tab.
- Then you can find and click on “Visual Basic” button.
- Next in the new window, you should double click on the “ThisOutlookSession” project.
- Subsequently, you need to copy and paste the following VBA codes into it.
Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim strSubject As String If InStr(Item.Subject, "RE") > 0 Then 'If you don't want the prompt, 'You can remove the MsgBox line and its correspoding "Else … End If" lines. If MsgBox("Do you want to remove the prefix 'RE'?", vbYesNo) = vbYes Then strSubject = Replace(Item.Subject, "RE:", "", vbTextCompare) Else strSubject = Item.Subject End If End If If InStr(Item.Subject, "FW") > 0 Then If MsgBox("Do you want to remove the prefix 'FW'?", vbYesNo) = vbYes Then strSubject = Replace(Item.Subject, "FW:", "", vbTextCompare) Else strSubject = Item.Subject End If End If Item.Subject = Trim(strSubject) Item.Save End Sub
- After that, you should sign a digital certificate to this macro.
- Later you can exit the “Visual Basic” window and configure Outlook to enable the digitally signed macros only.
- Finally you can have a try.
- Firstly, select an email and hit “Reply”, “Reply All” or “Forward” button
- Then the replying or forwarding message will open. You can compose the mail as usual.
- When clicking on “Send” button, you will receive a message box, like the following screenshot:
- If you select “Yes”, the prefix “RE” or “FW” will be removed automatically. If you select “No”, the prefix will not be removed.
What Not to Do in Dealing with Outlook Emails
Outlook is vulnerable, so you should keep cautious when handling Outlook mails. For instance, if you receive emails from unknown sources, you’d better not open it, not to mention click the embedded links or download the attached files. This kind of emails may contain malicious macros, viruses or malware, which can ruin your Outlook data in a flash. It means that you will suffer Outlook file damage. At that point, your unique resort is to employ a powerful and reputable repair tool, like DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair corrupt mdf db and outlook repair software products. For more information visit www.datanumen.com