I'm not entirely sure if this should go in the C# or Office Dev forums, but here goes anyway:
I'm autogenerating an email from data contained within my program using the Outlook Interop Namespace (9.3.0.0).
This is OK, but a little plain: I would like to add some formatting: Italics on "Refer to images", Bold on "Priority", etc. I've had a few quick attempts with .olFormatHTML and .olFormatRichText, but with no luck. Any help would be appreciated. Thanks!Code:Outlook.Application moApp = new Outlook.Application(); Outlook.MailItem oEmail = (Outlook.MailItem)moApp.CreateItem(Outlook.OlItemType.olMailItem); oEmail.Subject = "Project " + ProjectName + "- Reference # " + dlog.RefNum.Text + " - " + Ref_Description.Text; oEmail.BodyFormat = Outlook.OlBodyFormat.olFormatHTML; oEmail.Body = @"Refer to images " + Ref_Imgs.Text + @" " + Ref_FullBodyDescription.Text + @" PRIORITY: " + dlog.priority.Text + @" Regards, " + userName + @" " + companyName;
C# Express, 2005.




Reply With Quote