• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1559
  • Last Modified:

bold part of string (vb.net)

sMsgbody = "Attached are the grade reports.  These papers must be completed and returned to this email address by 3/05/2000." & vbCrLf & vbCrLf & _
                   "Please close all open apps before opening the attachments." & vbCrLf & vbCrLf & vbCrLf & vbCrLf  & vbLf & vbLf & vbLf & vbLf & "Laundry and Equipment"

In the text, Id like to bold "Laundry and Equipment"
Is it possible?
Im using wiindows forms

0
zachvaldez
Asked:
zachvaldez
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
Éric MoreauSenior .Net ConsultantCommented:
where is this sMsgbody used? If you render it in a label, there is no way. If you render it in a HTML container, you can use <b>...</b> (but then you will have to replace your vbCRLF with <br />).
0
 
4runnerfunCommented:
Also, if it is a label, you could create two separate labels, having the first part of your message go into the first label, and the "Laundry and Equipment" portion going into the second label, having the font of the second label as bold.
0
 
zachvaldezAuthor Commented:
it is rendered in the body of the email..
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Éric MoreauSenior .Net ConsultantCommented:
then you can use the html tags <b>...</b> and <br />

also check http://www.emoreau.com/Entries/Articles/2007/09/Using-SystemNetMail.aspx
0
 
zachvaldezAuthor Commented:
Just to clarify .Is a regular email document sent thru Groupwise consider an Html document?
0
 
Mohamed AbowardaSoftware EngineerCommented:
You need to set the MIME Content-Type to text/html NOT text/plain, then you can send the email normally and use <strong>Bold text goes here...</strong>
0
 
zachvaldezAuthor Commented:
Interesting! "You need to set the MIME Content-Type to text/html NOT text/plain"
How do I set it?


0
 
Mohamed AbowardaSoftware EngineerCommented:
You can set MIME Content-Type by changing the email header
http://en.wikipedia.org/wiki/MIME
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now