Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm using Microsoft.Office.Interop.Outlook, VB.net and Office 2013 to generate a MailItem, and then send the item to Outlook, show the email window and let the user edit it/send it from Outlook 2013. The main things I'm doing are:

I create the Microsoft.Office.Interop.Outlook.MailItem object and fill it with the relevant information, I generate an HTML constant for the 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 I want to a string variable strBody and use String.Format to insert the text in the HTMLBody of my object:

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

I also change the format of the body to HTML:

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

After a few other steps I send it to the view

objMailItem.Display(True)

My problem is, when the user sends the email, the receiver will see that the email has a message with the subject as Text

any clue of why this happens?

enter image description here

like image 621
gbdavid Avatar asked Jun 20 '14 16:06

gbdavid


People also ask

How do I remove a tag in Outlook?

Select the email you want to remove a tag from. Locate the tag. Then click the 'x' to remove it from the selected email message. Note: If other messages are tagged with this keyword, the system does NOT remove the tag from the Emails tool or from any other emails.

How do I get rid of high importance tag in Outlook?

In the Tags group on the Ribbon, click the More arrow to open the Message Options dialog. Use the Importance drop-down to change the importance level, then click Close.

How do I view tags in outlook?

On your Outlook Home tab, navigate to the Tags section (it's the fifth section from the right) and click Categorize.


1 Answers

It's an Outlook "feature". Outlook purposely puts <end> in the message preview when the body isn't long enough to fill the preview.

It's not caused by your code or any bad HTML formatting.

like image 175
Keith Avatar answered Sep 28 '22 10:09

Keith