When replying or fw how can i remove that message.that come automatically in the subject as Re\Fw

Hi,

When replying or fw how can i remove that message.that come automatically in the subject as Re\Fw.

I want that to happen to all emails that i forward or reply.

regards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
 
David LeeConnect With a Mentor Commented:
This should do it.  Follow these instructions to add the code to Outlook.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects and click on ThisOutlookSession
4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
5.  Edit the code as needed.  I included comment lines wherever something needs to or can change
6.  Add the following line of code to your existing ItemSend subroutine:
    StripFWandRE
7.  Click the diskette icon on the toolbar to save the changes
8.  Close the VB Editor
9.  Click Tools > Trust Center
10.  Click Macro Security
11. Set Macro Security to "Warnings for all macros"
12. Click OK
13. Close Outlook
14. Start Outlook.  Outlook will display a dialog-box warning that ThisOutlookSession contains macros and asking if you want to allow them to run.  Say yes.
Sub StripFWandRE(olkMsg As Outlook.MailItem)
    If (Left(olkMsg.Subject, 4) = "FW: ") Or (Left(olkMsg.Subject, 4) = "RE: ") Then
        olkMsg.Subject = Mid(olkMsg.Subject, 5)
        olkMsg.Save
    End If
End Sub

Open in new window

0
 
kpmartinCommented:
Pretty simple to just highlight and delete the subject and type your own in there.  Same with the body just<ctrl>a to select all and delete.  I do that all the time especially to clean up multiple forwards.  Highlight the orig text/photos and cut/paste back then delete all the forward marks lines etc.
0
 
David LeeCommented:
Hi, Sharath.

This is another question that's difficult to solve because of the way Outlook works.  In order to detect when a message is being replied to or forwarded requires that the code set a watch on it.  Seems simple enough until you consider that you can open more than one message at a time.  That means the code has to be able to monitor multiple items at once.  Here's what happens if the code can't monitor multiple items at once.  You open message #1 and the code begins monitoring it.  You then open item #2 and the code drops the monitor on the first item and begins monitoring the second item.  You then close item #2.  The code stops monitoring it and is now monitoring nothing.  When you reply to item #1 nothing happens.  Unfortunately, monitoring multiple items at once is a major undertaking.  It requires writing something called a wrapper class.  This class can monitor multiple open items, but as I said it is a MAJOR undertaking.  That's in the realm of professional programming.  

A simpler solution is to write a macro that only works for one item and only for items in the inbox.  Such a solution will not work for items that aren't in the inbox and will fail completely if two items are opened at once.  

A better solution is to add code to the ItemSend subroutine that strips the "RE:" or "FW:" as the messages are sent instead of attempting to strip them when you click reply or forward.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
bsharathAuthor Commented:
Hi David,

A better solution is to add code to the ItemSend subroutine that strips the "RE:" or "FW:" as the messages are sent instead of attempting to strip them when you click reply or forward.

The above seems fine. If i cannot see the change i dont mind. If the users can get the subject without them i am happy. Though i can see them in the sent mails
0
 
ComputerBeastCommented:
This prob can be resolved by making changes in the code, as mentioned by BlueDevilFan in his reply. But, playing with codes can be risky so better remove RE: or FW: manually.

Because, while playing with codes if you do some wring changes then Outlook  may create another sort of issues.
0
 
SdDeoCommented:
Code is not Working for me. While adding the Code in Apllication_Itemsend, It says an Argument is required.
I am new to VB.Can you help me get this right,
 
0
 
David LeeCommented:
The line of code in Application_ItemSend should be

StripFWandRE Item
0
 
SdDeoCommented:
Thanks !!!! Its working Perfectly
0
 
David LeeCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.