Click to See Complete Forum and Search --> : TextBox to email body using CDONTS - Bad format with Commas.


TagUK2006
04-16-2007, 07:44 PM
HI Guys,

I have a simple form that takes a users text and adds it to the body of a CDONTS mail script I have on an ASP page using VBS.

Its working well except if I add a comma ' into the text box in the message as it comes out all wrong in the email when sent.

Its not going to a database or I would have used the the replace function for commas.. so I had a google search but cant seem to find anything..

Any suggestions are very welcomed.
Thanks
Tag

gil davis
04-17-2007, 07:15 AM
Don't you mean apostrophe?

TagUK2006
04-17-2007, 07:19 AM
Hi Gil

Yes sorry, your correct I do mean apostrophe ..sorry, it was a late night post before bed.. ;-)

TagUK2006
04-17-2007, 08:09 AM
I think I have it, it seems to work although Im not sure how efficient or correct the code may be..

I tried the replace for apostrophe Id use for access and sql but it didnt like it so I tried this and it seems to like it..

replace(txtMailMessage,"'",Chr(39))

Thanks again
Tag