Ubersnack

Hi,

I wrote an application a few months ago that programmatically set the signature for outgoing emails (using some of the code from this forum, thanks!) and setting the signature works perfectly...

However, the company have their email signature in rich text format, and do not want anyone sending html emails. I have had a try at it, the closest thing I have found is in Microsoft.Office.Interop.Outlook, an enum called OlBodyFormat. Is there any way to set it so that any emails created in future will use rtf as the default

I had a go at it using the only function i could see that would let me set it (segments of code are below)

using Outlook = Microsoft.Office.Interop.Outlook;

using Word = Microsoft.Office.Interop.Word;

...

// set the default message format for emails to rich text format

Outlook.Application appidge = new Outlook.ApplicationClass();

Outlook.MailItemClass mi = (Outlook.MailItemClass)appidge;

mi.BodyFormat = Outlook.OlBodyFormat.olFormatRichText;

// create the object references and add the entry

Word.EmailOptions options = wordApp.EmailOptions;

...

This cause an exception when I test it - how would I do this correctly

Thanks in advance

Chris



Re: Visual Studio Tools for Office setting default message format to rich text in outlook 2003 using C#

bijulsoni

hi can u pls help me for how to programmatically set the signature for outgoing emails from Outlook Express.

I will appreciate your help






Re: Visual Studio Tools for Office setting default message format to rich text in outlook 2003 using C#

PanduRangiah

Is it possible to share the code on how to set signature for outgoing emails. We are looking for this option in our project.

Any Help is appreciated.






Re: Visual Studio Tools for Office setting default message format to rich text in outlook 2003 using C#

Sue Mosher - Outlook MVP

Pandu, your question is not at all related to the original subject of this topic thread. You might want to start a new topic thread and provide more detail, such as *when* you want to set the signature -- for a single message or for all messages, for one account or for all accounts, etc. Also note that this forum is mainly for architectural and deployment issues dealing with VSTO. For general Outlook programming questions like yours, the microsoft.public.outlook.program_vba newsgroup at http://www.microsoft.com/office/community/en-us/default.mspx dg=microsoft.public.outlook.program_vba would be a better venue.