Solved

bold part of string (vb.net)

Posted on 2011-02-24
8
1,341 Views
Last Modified: 2012-06-21
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
Comment
Question by:zachvaldez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 34971591
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
 
LVL 3

Expert Comment

by:4runnerfun
ID: 34971630
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
 

Author Comment

by:zachvaldez
ID: 34972145
it is rendered in the body of the email..
0
Technology Partners: 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!

 
LVL 70

Accepted Solution

by:
Éric Moreau earned 150 total points
ID: 34972688
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
 

Author Comment

by:zachvaldez
ID: 34975202
Just to clarify .Is a regular email document sent thru Groupwise consider an Html document?
0
 
LVL 12

Assisted Solution

by:Mohamed Abowarda
Mohamed Abowarda earned 100 total points
ID: 34979158
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
 

Author Comment

by:zachvaldez
ID: 34980244
Interesting! "You need to set the MIME Content-Type to text/html NOT text/plain"
How do I set it?


0
 
LVL 12

Expert Comment

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

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Import Data from Multiple Text Files in Excel 12 86
VB.NET 2008 Publish Error 2 44
Data organization issue 7 37
Add Combobox column to datagridview using vb.net 2 27
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question