|
|
Vance Hunt
has provided home-user help desk style support for his consulting company for over 6 years. Making his home in beautiful Southern California, Vance provides general computer Q&A for users via his weekly column.
|
|
|
|
|
 | Friday, January 13, 2006 |
| Auto format those incoming emails in Plain Text. |
| By Vance Hunt |
| |
|
|
|
Is there a way to make Outlook convert incoming email messages from HTML to plain text automatically?
| | |
|
|
Incoming emails in HTML can be great from people you know, but a potential
privacy and security risk when sent from strangers. Although Outlook
XP, 2003 and the upcoming version 12 allow you to specify the default format to
write all your emails in, they don't have a realistic way to specify the
incoming format. All three of these versions let you open the email
message, and then "Plain Text" from the Format menu.
However, just because there is no available option via any of the dialogs
doesn't mean you can't make Outlook automatically convert message via scripting.
These versions of Outlook let you create custom actions via macros and scripts.
Those scripts can then be used within rules. Give this a try:
- From within Outlook, select Tools | Macros | Visual Basic Editor
(Alt+F11), and then maximize the editor that opens.
- From the tree on the left, right-click on "Project1" and select Insert |
Module
- A new folder and module option will appear in the tree. On the
right-pane, type in the following:
Sub ConvertHTMLToPlain(MyMail As MailItem) Dim strID As String Dim olNS As Outlook.NameSpace Dim olMail As Outlook.MailItem
strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set olMail = olNS.GetItemFromID(strID) olMail.BodyFormat = olFormatPlain olMail.Save
Set olMail = Nothing Set olNS = Nothing End Sub
- From the File menu, select to Save Project1, then exit from the editor
- From the main Outlook window, select Tools | Rules and Alerts
- I'm not going to go over the rules creation wizards, so if you're not
familiar with them, read the online documentation. What I want to point
out here is an option now available to you, and I'll do this by creating a very
generic rule.
- Press New Rule
- Select "Start from a blank rule"
- Select "Check messages when they arrive", and press Next
- Do not select any "Step 1" boxes, and press Next, and then Yes on the
warning message that says this rule will be applied against all incoming
messages.
- Scroll down, and select "run a script". Then, click on the underlined
word: script. A dialog will pop up showing the function you just created.
Select the function.
- Click Next, Next, Finish and OK
- Now that you have a new rule, you'll need to either wait until a new message
comes in, or you can create an HTML message and send it to yourself. When
you open it, you'll see that the message is displayed in plain text.
This custom action is used by creating a VBA applet. VBA is a scripting
platform available in not only all Microsoft Office applications, but many other
applications as well. This particular applet is included in the book Microsoft Outlook Programming, Jumpstart for Administrators, Developers, and Power Users
by Sue Mosher and
available freely on-line
here. If
you like the idea of creating your own custom actions, you might want to give
this book a look.
|
Comments:
[0]
[Show Disclaimer]
The information posted within the comments section are the opinions of its authors.
Such opinions may not be accurate and they are to be used at your own risk. Dx21, LLC cannot verify the validity of the
statements made within the posted comments. ¶ Messages that harass, abuse or threaten other members; have obscene or otherwise objectionable content; have spam,
commercial or advertising content will be removed. Please do not post any private information unless you want it to
be available publicly. Never assume that you are completely anonymous and cannot be identified by your posts.
|
Previous Ask Vance Questions:
|