Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bold text in VBScript text

Status
Not open for further replies.
Feb 4, 2002
792
GB
I am building and sending an email message with VBScript.

All works well, but I would like to bold certain words in the message body, which is a built (concatenated) string. For example, I use VbTab when I want to make a tab, and VbCrLf when I want a new line:

Code:
[i]snippet[/i]
mySmartMail.Body = "This mail has been sent from: " & Request("company") & VbCrLf &_
  "Attending? " & VbTab & VbTab & VbTab & Request("attendaim") & VbCrLf &_
  "Informal Dinner? " & VbTab & VbTab & Request("dinnerinf") & VbCrLf &_
  "Main Dinner? " & VbTab & VbTab & Request("dinnermain") & VbCrLf &_
  "Reserve? " & VbTab & VbTab & VbTab & Request("reserve") & VbCrLf &_
  "Reservation Details: " & VbTab & Request("reservation") & VbCrLf

I'd like to bold the Request values.

Anybody have a quick way i can do this without 3rd party tools?

Will
 
did you mean this:

mySmartMail.Body = "This mail has been sent from: "<b>"&" & Request("company") & "</b>"&VbCrLf &_

-DNG
 
Here is what the text looks like in the email:

This mail has been sent from: Russ Co.
Attending? <b> yes</b>
Informal Dinner? <b> yes</b>
Main Dinner? <b> yes</b>
Reserve? <b> yes</b>
Reservation Details:<b> Dec 1st</b>

Will
 
Thanks Chris. No probs.

I guess if I used a different mail control dll on the server that allowed such formatting, that might help...

Anyone use aspSmartMail (the one I am using), and know how it's configured to allow rich text? (i.e. if it can?)

Or know of another free mail control?

Will
 
I would think it would support HTML, have you checked the website for it ?

If not there is CDOSYS that comes with IIS 5 onwards. that supports both text and HTML



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Great ideas, chaps! Thanks.

I will give them a try and see if I can finally do what I wanted, but in the meantime have already implemented the email form solution for now. But it is always good to learn new things, so i appreciate all the info on CDOSYS!

Thanks,

Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top