Solved

bold part of string (vb.net)

Posted on 2011-02-24
8
1,248 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
Comment Utility
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
Comment Utility
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
Comment Utility
it is rendered in the body of the email..
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 150 total points
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:zachvaldez
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
You can set MIME Content-Type by changing the email header
http://en.wikipedia.org/wiki/MIME
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

12 Experts available now in Live!

Get 1:1 Help Now