View Single Post
  #4  
Old December 6th 07, 10:08 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Setting the font of the message body

You really should be working with HTMLBody in that case and inserting your
text either inside existing formatting tags or using your own formatting
tags.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Vaelek" wrote in message
...
This is Outlook 2003. I am using HTML format but I do not use any tags.
My function looks as such:

Outlook.ApplicationClass olApp = new ApplicationClass();
Outlook.MailItem mailitem =
(Outlook.MailItem)olApp.CreateItem(Outlook.OlItemT ype.olMailItem);
mailitem.BodyFormat = OlBodyFormat.olFormatHTML;

mailitem.Subject = "Incident ";
mailitem.Body = "\r\n\r\n\r\n\r\nRegards,\r\n\r\n" +
_client.Signature;
mailitem.SentOnBehalfOfName = _client.SupportAddress;
mailitem.BCC = ";
mailitem.Importance = Outlook.OlImportance.olImportanceNormal;
mailitem.Display(false);

All the text populated in the above code is in Arial font. If I place the
cursor above the text and start typing, it switches to Times New Roman.
The
issue isn't so much that I want to specify the font, I would just like the
entire body to be consistent, eg Arial.


Ads