Odd <end> tag in Outlook 2013 Microsoft Office Interop message view

I use Microsoft.Office.Interop.Outlook, VB.net and Office 2013 to generate MailItem and then send the item to Outlook, show the email window and allow the user to edit / send it from Outlook 2013 The main thing I do:

I create a Microsoft.Office.Interop.Outlook.MailItem object and populate it with the appropriate information, I generate an HTML constant for a body like this

Private Const mstrHTML_FORMAT As String = "<html><p style='font-size:10pt;font-family:Arial;'>{0}</p></html>"

Then I add the text that is required for the strBody string variable, and use String.Format to insert the text into the HTML code of my object:

objMailItem.HTMLBody = String.Format(mstrHTML_FORMAT, strBody)

I also change the body format to HTML:

 objMailItem.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML

After a few other steps I will send it to the view

objMailItem.Display(True)

, , ,

, ?

enter image description here

+4
1

Outlook. Outlook <end> , , .

HTML.

+17

Source: https://habr.com/ru/post/1545401/


All Articles