double quotes in email message

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I am trying to replace the double quotes in an email message.
So if the message is.

I "love" my dog. I want to replace the double quotes. Problem is when I
do mailItem.MessageText.Replace("\"", "##"); for example it does nothing
b/c the double quotes in the message are represented with something like
inverted commas.
Does anyone have any experience with this?
Thanks
 
I forget offhand the ASCII code for those quote characters but you can test
it for yourself. Just get some of that text in a string variable and check
for the ASC value. Then use Chr(x) where x is the ASCII code you discovered
in your Replace call.
 
Thanks Ken, I found out the ASCII values and they were 8220 and 8221 and
then used Replace((char)8220, (char)34); 34 is the ASCII value for "
Thanks again.
 
Back
Top