Change the Default Message Format for Outlook Application via Inte

C

cursors

Does anyone have an example in C# (preferred) or VB.NET of setting the
default message format programmaticly using Microsoft.Office.Interop.Outlook?
This is the same setting that is accessed using these steps:

Outlook:Tools:Options:Mail Format:Compose in this meassage format:
HTML|Rich Text|Plain Text

I'd like to change this setting in the user's Outlook 2007from a custom
Windows.Forms application that I am building.

Thanks,
Brad Pipins
Oklahoma City, OK
 
K

Ken Slovak - [MVP - Outlook]

That value is set in the registry at
HKCU\Software\Microsoft\Office\xx.0\Outlook\Options\Mail\EditorPreference as
a DWORD. The exact path depends on the version of Outlook. for 2002 it would
be 10.0, for 2003 it would be 11.0 and for 2007 it would be 12.0.

The value you set there would depend on whether or not WordMail is being
used and also if it's Outlook 2007. Since you don't mention your desired
format you'd have to examine that key and see what the value is for each
setting, with and without WordMail. As an example, if you want HTML format
you would always set the value to 0x00020000 for Outlook 2007. If it's
Outlook 2003 and the current value ends in 0x1 then WordMail is being used
and you'd return 0x00020001, otherwise you'd return 0x00020000.

Then of course there are other settings related to whether or not stationery
or themes are being used in the email settings, those are located under
HKCU\Software\Microsoft\Office\xx.0\Common\MailSettings.
 

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

Top