Convert all incoming e-mail to a single format on reciept

hi Experts,

My boss wants the whole company to work using HTML formatted mail, to make sure that everyone is using the same signature file, that includes our logo and so on.

I worked out that you can do this in Outlook 2003 by using the 'Run a Script' option in the rules set.

I wrote this script in VB in the VBAProject.otm / ThisOutlookSession module:

      Sub ConvertAlltoHTML(objMsg As MailItem)
          objMsg.BodyFormat = olFormatHTML
      End Sub

Then created a Rule (using the Rule Wizard) that states:

      Apply this rule after message arrives
      run Project1.ThisOutlookSession.ConvertAlltoHTML

There are no exceptions, so this should run on every incoming message and convert it to HTML. Except it doesn't. In fact it appears to have no effect at all.

I know virtually nothing about VBA, so suspect that it is something I have done there. Can I ask for answers  suitable for a newbie please.

Thanks for your help...
Who is Participating?
1.  You should never use RTF for internet mail, it should only be used within your organization.  Even if the recipient supports RTF, you can still have problems if the message is just routing thru servers that don't.

2.  If a company you are working with sends email in plain text, I would assume it is because either their email server doesn't support HTML (rare but possible) or they have chosen not to use HTML format because Plain Text is smaller and universal.  Therefore replying back to them in a format other than the one they have chosen to converse with you in could either cause compatibility problems or be seen as an "etiquette" breach.

3.  Assuming that you send no email out to the Internet in Rich Text (which you should definitely configure under TOOLS->OPTIONS->MAIL FORMAT->INTERNET FORMAT) that would leave you with just two formats (HTML and Plain Text) which means that you only have two signatures (again HTML and Plain Text).  So I'm confused by the "load of different signature files" problem description.  You can open both the HTML and PlainText signatures to verify that they are acceptable in appearance.  They are normally in:
     C:\Documents and Settings\<username>\Application Data\Microsoft\Signatures

4.  You might want to consider converting the email when sending it, I have tested this and it works as expected without bringing the rules wizard into the equation.

5.  Ignoring all of the above, I wrote a script to do what you are asking, almost identical to yours, and it is doing what you have requested when I test it on my side, Outlook 2003 connecting to Exchange 2003:

Sub Convert(olMail As Outlook.MailItem)
If olMail.BodyFormat = olFormatPlain Then
olMail.BodyFormat = olFormatHTML
End If
End Sub
Well, your rule is checking incoming email, not outgoing email.

Are you in an Exchange environment?
>My boss wants the whole company to work using HTML formatted mail, to make sure that everyone is using the same signature file, that includes our logo and so on.

As long as your settings are to compose mail in HTML format all OUTGOING mail, forwards and replies, will have your standardized signature and logo (assuming you've set that part up).

I have never heard of converting non HTML mail to HTML, but if you have an Internal mail server, you could probably have it set up to receive and forward to another internal address (forwarding HTML) from which people will get their mail... but honestly that's just not sensible...

Sending in HTML is one thing (and probably fulfills the boss's need for sig and logo on all) even though it is questionable 'netiquette' and a plain text signature would be 'more professional'...

but receiving in HTML is nothing more than a security risk.

soxladeAuthor Commented:

Thanks for the replies.  Couple of bits of clarification:

 - Yes we are running an exchange environment (nineteen exchange servers worldwide our IT bods tell me), but I won't be able to add any server side scripting (I work for the marketing department) hence why I am trying to please my boss with some Client-side code.

The reason for trying to convert all incoming mail to HTML in the user's Inbox is that when somebody hits the 'reply' or 'reply to all' buttons, the new message is composed in the format the message being replied to was recieved in. For example, if a message is recieved in Plain text, then the reply is written in Plain text and so on.

This leads to a load of different signature files being sent out from the company - which from the marketing POV ain't that great. I had the idea of converting all incoming mail to HTML format, so that when the 'reply to' is pressed all the outgoing mail goes out with a single-formatted signature file (preferable HTML for the extra formatting that offers...)

How would I make sure that every outgoing e-mail is formatted in HTML format (I know it isn't the best, but for our industry it will be ok and ticks the box my boss wants too). Or would RTF be a better halfway house? (In which case the above question still applies)

soxladeAuthor Commented:

Thanks for the response.

I didn't know about the netiquette of RTF mail so have removed that from the equation.

I'm trying to develop a standard across the company for email - and am recommending HTML. From this conversation I have also edited the Signature file so that it displays satisfactorily in Plain text and HTML. The converting when sending - for some reason I'm not sure of - doesn't work. If I recieve a mail in plain text, hit the 'reply' button, my reply is written and sent in Plain text no matter what my Send Email setting is.

Taking the advice gathered from yourself I have now decided to return to my boss with a simplified plan using a sensibly formatted signature file and telling him to accept that things will change depending on the format of the recieved e-mail. I will also explain the netiquette issues to him.

BTW the script you sent seems to work fine. Thank you for your efforts.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.