![]() |
| ||
| Constructing an A href link in CDO Hi Guys I am trying to send a link in an email to my users - I am using CDO. I am having trouble contructing the link. Currently I am receiving the message "syntax error". strBody = strBody & <a name= & "anchor" & id= & (rsEmailAlert.Fields.Item("S_Id").value) & href= & " http://www.hair-salons.com/Hair-Salon-Search.asp" & > & "CLICK HERE" & </a> & vbCrLfAny help would be great:) |
| ||
| Re: Constructing an A href link in CDO Quote:
strBody = strBody & "<a name=" & anchor & " id=" & (rsEmailAlert.Fields.Item("S_Id").value) & " href='http://www.hair-salons.com/Hair-Salon-Search.asp'>Click Here</a>" & vbCrLfThis should work. Let me know if it doesn't. |
| ||
| Re: Constructing an A href link in CDO Hi Thanks for your reply. The email is sent ok but the link appears like this: <a name= id=1 href='http://www.hair-salons.com/Hair-Salon-Search.asp'>Click Here</a> At the moment the <a name> is empty and I was hoping the link might appear in the email like this: Click Here .. |
| ||
| Re: Constructing an A href link in CDO It sounds like you are sending mail using text format. Make sure that you include this in your script: myMail.BodyFormat = 0 Also, is the name supposed to equal "anchor" or is "anchor" a variable that should = something else? If name=anchor then use this code: strBody = strBody & "<a name='anchor' id='" & (rsEmailAlert.Fields.Item("S_Id").value) & "' href='http://www.hair-salons.com/Hair-Salon-Search.asp'>Click Here</a>" & vbCrLfHope this helps. |
| ||
| Re: Constructing an A href link in CDO Works well - Thanks for all your help. |
| All times are GMT -4. The time now is 8:18 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC