Autoformat Plain Text email macro

  • Thread starter Thread starter Sriram N A
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top