I've been forced to use MS Outlook as a mail client for some years now. For my work, I tend to communicate with Open Source software developers and mailinglists quite often. Needless to say, the Outlook reply style and HTML formatting of messages is not really compatible with that.
To overcome this, I've been using a VBA macro to create a special ReplyToAll button. Today, I've perfected this macro and I'm publishing it for others to use.
The macro has the following features:
- Reply in Plain Text automatically
- Set Reply Style to use '>' indenting, a.k.a. in-line reply style
- Get rid of automatic signature that Outlook may insert into the reply
- Remove the Outlook Reply header and replace with "On <DATE>, <NAME> wrote:"
Note that I'm not at all experienced in writing VBA macros, so the coding is a bit messy:
' ' Reply To All in Plain Text, with Linux-style quoting ' ' This allows you to use Outlook to reply to a mailinglist ' ' Copyright 2009 Matthijs van de Water ' Sub ReplyAllPlain() Dim app As New Outlook.Application Dim exp As Outlook.Explorer Set exp = app.ActiveExplorer Dim strID As String Dim olNS As Outlook.NameSpace Dim item As Outlook.MailItem 'Get MailItem based on EntryID, otherwise we'll get security warnings strID = exp.Selection.item(1).EntryID Set olNS = Application.GetNamespace("MAPI") Set item = olNS.GetItemFromID(strID) ' Store name of the sender and date of sent message Dim name As String name = item.SentOnBehalfOfName datestr = Format(item.SentOn, "DDD, MMM dd, yyyy at HH:mm:ss") ' ReplyToAll to this message in Plain formatting with > style item.BodyFormat = olFormatPlain item.Actions("Reply to All").ReplyStyle = olReplyTickOriginalText Dim rply As Outlook.MailItem Set rply = item.ReplyAll ' Rebuild original body: ' - Remove Outlook-style reply header ' - Get rid of auto-inserted signature (optionally move to end of message) orgBody = rply.Body pos = InStr(orgBody, ">") - 1 sig = Left(orgBody, pos) myBody = Mid(orgBody, pos + 1) b = 0 lines = Split(myBody, vbNewLine) For Each myLine In lines If b > 4 Then newBody = newBody & myLine & vbNewLine End If b = b + 1 Next ' Put new body together rply.Body = "On " & datestr & ", " & name & " wrote:" _ & vbNewLine & newBody & vbNewLine '& sig rply.Display item.Close olDiscard End Sub