Format a line in Outlook message
-
Hi I'm using the following code to create an outlook mail message, but need to bold and undeline certain lines in the message body. How can I do this?
Dim oOutlook As New Outlook.Application Dim oMailitem As Outlook.MailItem oMailitem = CType(oOutlook.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem) oMailitem.To = "" oMailitem.Subject = "Order Request" Dim MailBody As String = "Hi," _ & ControlChars.NewLine _ & "Please could you place orders as per the requirement below" _ & ControlChars.NewLine _ & "I WANT THIS LINE BOLD....." _ & ControlChars.NewLine _ & "Thanks!!"
-
Hi I'm using the following code to create an outlook mail message, but need to bold and undeline certain lines in the message body. How can I do this?
Dim oOutlook As New Outlook.Application Dim oMailitem As Outlook.MailItem oMailitem = CType(oOutlook.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem) oMailitem.To = "" oMailitem.Subject = "Order Request" Dim MailBody As String = "Hi," _ & ControlChars.NewLine _ & "Please could you place orders as per the requirement below" _ & ControlChars.NewLine _ & "I WANT THIS LINE BOLD....." _ & ControlChars.NewLine _ & "Thanks!!"
Hmmm I havent tried this yet but here are some suggestions: If the users are recieving the mail as html you could use html tags in you msg.Body Or since outlook uses word as its email editor - open up word (in code and see what functionality this offers you) Hope these pointers help If i get time to look into this i shall try them and let you know my results Dan