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.

We all have those people who decide to put a ton of junk mark-up in their emails and make it nearly impossible to read. What I'd like to have is a rule in Outlook 2010 that as soon as an email comes from a certain person (or probably group) it automatically converts it to plain-text instead of html. Any ideas?

share|improve this question
    
It would be better to do this on the server, but I understand that's not always feasible. –  Justin Dearing Aug 10 '12 at 20:43
add comment

3 Answers

If you are concerned about the display and do not really need to convert see here for instructions to "Read as Plain Text" http://support.microsoft.com/kb/831607

share|improve this answer
    
Hrm that's much simpler, and doesn't alter the original messages. –  Justin Dearing Aug 10 '12 at 23:03
    
is there a way to use that with a rule, or somehow tie it to just one person? –  aron.duby Aug 11 '12 at 15:06
    
@aron.duby the method described here is global, not for one user. Use my VBA method, perhaps creating a copy of the image laden message to just apply it to one user. –  Justin Dearing Aug 12 '12 at 3:21
add comment

You can edit a message with VBA. According to the MSDN, if you set the _MailItem.BodyFormat property to olFormatPlain it will discard all formatting.

This article on using VBA as a more powerful alternative to the Outlook filtering rules should set you in the right direction.

share|improve this answer
add comment

A rule that incorporates the VBA required can be found here, with ItemAdd and NewMailEx alernatives.

http://www.outlookcode.com/article.aspx?id=62

Sub ConvertToPlain(MyMail As MailItem)
Dim strID As String
Dim objMail As Outlook.MailItem

strID = MyMail.EntryID
Set objMail = Application.Session.GetItemFromID(strID)
objMail.BodyFormat = olFormatPlain
objMail.Save

Set objMail = Nothing
End Sub

For the ItemAdd and NewMailEx solutions you can limit the conversion by testing for the SenderName or SenderEmailAddress like this.

If objMail.SenderName = "Mailer, HTML" Then
    objMail.BodyFormat = olFormatPlain
    objMail.Save
End if

You can find the SenderName with this. (For unknown reasons one of my senders does not have a SenderEmailAddress.)

Sub Addresses_CurrentItem()

Dim olMail As Object

On Error Resume Next
Set olMail = ActiveInspector.currentItem

If olMail Is Nothing Then
' might be in the explorer window
    If (ActiveExplorer.selection.Count = 1) And _
     (ActiveExplorer.selection.Item(1).Class = olMail) Then
        Set olMail = ActiveExplorer.selection.Item(1)
    End If
End If
On Error GoTo 0

If olMail Is Nothing Then

MsgBox "Problem." & vbCr & vbCr & "Try again " & _
"under one of the following conditions:" & vbCr & _
    "-- You are viewing a single email message." & vbCr & _
    "-- You have only one message selected.", _
vbInformation
Exit Sub
End If

If TypeOf olMail Is MailItem Then

Debug.Print "  Sender    : " & olMail.SenderName   
Debug.Print "  SenderEmailAddress: " & olMail.SenderEmailAddress & vbCr

End If

End Sub
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.