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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 CDONTS questions: color body and open in new window

Status
Not open for further replies.

acmeweb

Programmer
Nov 21, 2003
9
0
0
US
if i have this;
objMail.Body = "Email: " & strEmail & vbCrLf & vbCrLf & _
"First Name: " & strName & vbCrLf & _

how can i make the strName a diff color than the "First Name:" ? i want the strName in red so it stands out.

also:
if i have this form;
<FORM name=&quot;Form1&quot; ACTION=&quot; METHOD=&quot;POST&quot;>
along with this submit button;
<input type=&quot;submit&quot; name=&quot;GO&quot; value=&quot;GO&quot;>
how do you make it open in a new window?
 
You can try
Code:
objMail.Body = &quot;Email: <font color=red>&quot; & strEmail & &quot;</font>&quot;
In the <form> tab, add the &quot;target&quot; attribute:
Code:
<FORM name=&quot;Form1&quot; ACTION=&quot;[URL unfurl="true"]http://www.myPage.com/myASP.asp&quot;;[/URL] METHOD=&quot;POST&quot; target=_blank>
 
the color didnt work, had tried that b4, but gonna mess with some more. as for the target=blank, silly me for not knowing that....jeez

thank you
 
There should be a way to set meddage Body format - either HTML or Text, HTML format should understand tags.
 
hey LV,

i added this;
ObjMail.BodyFormat = 0
ObjMail.MailFormat = 0
&quot;First Name: <font color=red>&quot; & strFirstName & &quot;</font>&quot; & vbCrLf & _
&quot;Last Name: &quot; & strLastName & vbCrLf & vbCrLf & _
&quot;Reservation Request: &quot; & strMonth & &quot; &quot; & strDay & &quot; &quot; & strYear
that worked well, but i lost my format of lines and spaces. i had this;

First Name: john
Last Name: doe

Reservation Request: November 23 2003

but with the new code i got this;

First Name: johnLast Name: doeReservation Request: November 23 2003

how do i get my line and space seperations?
 
Code:
msgBody = &quot;First Name: <font color=red>&quot; & strFirstName & &quot;</font><br>&quot;
msgBody = msgBody & &quot;Last Name: &quot; & strLastName & &quot;<br><br>&quot;
msgBody = msgBody & &quot;Reservation Request: &quot; & strMonth & &quot; &quot; & strDay & &quot; &quot; & strYear
objMail.Body = msgBody
Or maybe it makes sence to put the whole thing into a table:
Code:
msgBody = &quot;<table><tr><td>First Name:</td><td><font color=red>&quot;
msgBody = msgBody & strFirstName & &quot;</font></td></tr>&quot;
msgBody = msgBody & &quot;<tr><td>Last Name:</td><td>&quot;
msgBody = msgBody & strLastName & &quot;</td></tr>&quot;
msgBody = msgBody & &quot;<tr><td colspan=2> </td></tr>&quot;
msgBody = msgBody & &quot;<tr><td>Reservation Request:</td><td>&quot;
msgBody = msgBody & strMonth & &quot; &quot; & strDay & &quot; &quot; & strYear & &quot;</td></tr></table>&quot;
objMail.Body = msgBody
 
i get it now...is like programming in html. works great. thanks for all your time, if you ever need anything just ask. fireworks or flash
 
Thanks, will keep that in mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top