Solved

bold part of string (vb.net)

Posted on 2011-02-24
8
1,275 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 69

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
 
LVL 69

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
help with issues with ReportViewer in VS2015 5 38
Opening and Closing Connections and Data Adapters 10 42
vb.net checkbox 7 41
Put window Form inside tab page 10 26
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now