Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Outlook, can I edit the subject line of incoming mail from a specific sender to keep only the third word of the subject line that is 5 words long? The 3rd word is unique to each email sent, the remaining text is always the same.

share|improve this question
add comment

1 Answer

This is very easy. Just create VBA macro (ALT+F11 in your Outlook and add the following code to your ThisOutlookSession) that looks like this :

Sub EditSubject(Item As Outlook.MailItem)
    Splitted = Split(Item.Subject)
    If UBound(Splitted) == 4 Then
        Item.Subject = Splitted(2)
        Item.Save
    End If
End Sub

After that create an Outlook Rule for that particular sender which runs this script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.