none
How to send bullet points and formatting in Outlook MailItem message body RRS feed

  • Question

  • Hi, I am trying to send formatted message(bullet points, content with underline, bold, color) to a recipient through outlook mail item. the BodyFormat of the mail item is set to Rich text or HTML. but in both cases outlook ignores the formatting and sends the email with it. Please guide me on this, so that i can send a mail to the recipient with formatted output(bullet points, numbering, color, bold, italics) Thanks and Regards Rohit Joshi
    Wednesday, December 23, 2009 10:02 AM

Answers

  • Hello Usha,

    I also have made a test in my side. And when sending this mail, I will see this format. The code like this, 
                Outlook.MailItem mi1 = this.Application.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) as Outlook.MailItem;
                mi1.BodyFormat=Outlook.OlBodyFormat.olFormatHTML;
                mi1.HTMLBody="<HTML><BODY>Type the message text here. </BODY><strong>This text is bold</strong><em>This text is italicized</em><ul><li>First item<li>Second item<li>Third item</ul> <p style=\"font-family:verdana;color:red\">This text is in Verdana and red</p></HTML>";
                mi1.To = "
    v-beszha@microsoft.com";
                mi1.Display(missing);
                mi1.Send();

    So I am afraid that it failed to write some line with formatted text.
    Please take a look at if there is a difference between us. If yes, please feel free to follow up.

    Best regards,
    Bessie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Bessie Zhao Wednesday, December 30, 2009 2:27 AM
    Friday, December 25, 2009 8:00 AM

All replies

  • Hello Usha,

    To reproduce this issue, would please tell us how you set the body of this mail item? Would you please share us with the code?

    Best regards,
    Bessie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, December 24, 2009 10:34 AM
  • Hello Usha,

    I also have made a test in my side. And when sending this mail, I will see this format. The code like this, 
                Outlook.MailItem mi1 = this.Application.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem) as Outlook.MailItem;
                mi1.BodyFormat=Outlook.OlBodyFormat.olFormatHTML;
                mi1.HTMLBody="<HTML><BODY>Type the message text here. </BODY><strong>This text is bold</strong><em>This text is italicized</em><ul><li>First item<li>Second item<li>Third item</ul> <p style=\"font-family:verdana;color:red\">This text is in Verdana and red</p></HTML>";
                mi1.To = "
    v-beszha@microsoft.com";
                mi1.Display(missing);
                mi1.Send();

    So I am afraid that it failed to write some line with formatted text.
    Please take a look at if there is a difference between us. If yes, please feel free to follow up.

    Best regards,
    Bessie


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Bessie Zhao Wednesday, December 30, 2009 2:27 AM
    Friday, December 25, 2009 8:00 AM