How to pass a combobox.text field in BOLD type

Y

yer darn tootin

Hello,
I have a method which takes various string values to create an
automated email.

Anyone know how I can make a particular string value passed appear in
bold type in the email? ( below, the cboPrio.Text value for example )


Email_AutoSend(sEmailTo, USER.Name, cboPrio.Text )

'calls method...

Public Sub Email_AutoSend(ByVal sTo As String, ByVal sSubject As
String, ByVal sBody as String )

Dim oApp As Outlook._Application
oApp = New Outlook.Application

' Create a new MailItem.
Dim oMsg As Outlook._MailItem =
CType(oApp.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)
With oMsg
..To = sTo
..Subject = sSubJect
..Body = sBody

If bAutoSend Then
..Send()
Else
..Display()
End If
End With
End Sub


thanks for any tips,
B
 
G

Guest

You will probably need to send the e-mail in HTML format (or maybe rich text
but I haven't tried that). Something along the lines of:

sHtml = "<HTML>\n" & _
"<HEAD>" & _
"<TITLE>Sample</TITLE>" & _
"</HEAD>" & _
"<BODY>" & _
"<P>" & _
"<STRONG>Bold Text</STRONG></P>" & _
"</BODY>" & _
</HTML>
oMsg.HTMLBody = sHtml;

Hope this helps
Chris.
 
G

Guest

You will probably need to send the e-mail in HTML format (haven't tried rich
text).
Something a long the lines of:

sHtml = "<HTML>\n" & _
"<HEAD>" & _
"<TITLE>Sample</TITLE>" & _
"</HEAD>" & _
"<BODY>" & _
"<P>" & _
"<STRONG>Bold Text</STRONG></P>" & _
"</BODY>" & _
"</HTML>"
oMsg.HTMLBody = sHtml;


Hope this helps.
Chris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top