Autoformat Plain Text email macro

S

Sriram N A

I have found it useful to use the WordMail AutoFormat option to read plain
text emails (typically newsletters). Using Outlook 2003.

I am attempting to setup a button which will carry out the equivalent of the
following steps in the UI for me:

1. Edit | Edit Message
2. Format | Rich Text
3. Format | AutoFormat -> Autoformat Now -> General Document

There does not appear to be a means of doing this in VBA - or is there?

Sriram
 
S

Sriram N A

Thanks for the tip; works great!:

Sub FormatPlainTextMail()
Dim colCB As CommandBars
Dim objCBB As CommandBarButton
Dim objDoc

Set colCB = ActiveInspector.CommandBars
Set objCBB = colCB.FindControl(, 5604)
If Not objCBB Is Nothing Then
objCBB.Execute
End If
Set objCBB = colCB.FindControl(, 5565)
If Not objCBB Is Nothing Then
objCBB.Execute
End If
Set objDoc = ActiveInspector.WordEditor
objDoc.Kind = wdDocumentNotSpecified
objDoc.Content.AutoFormat
End Sub
 
Top