Skip to content

Categories:

Remove MS Word Smart Quotes in Vbscript

just a little tidbit that was driving me crazy.

Haven’t used ASCW and CHRW much, but here it goes:

strtitle = Replace(strTitle,ChrW(8211),”–”)
strtitle = Replace(strTitle,ChrW(8212),”–”)
strtitle = Replace(strTitle,ChrW(8216),”‘”)
strtitle = Replace(strTitle,ChrW(8217),”‘”)
strtitle = Replace(strTitle,ChrW(8220),”"”")
strtitle = Replace(strTitle,ChrW(8221),”"”")
strtitle = Replace(strTitle,ChrW(8226),”*”)
strtitle = Replace(strTitle,ChrW(8482),”")
strtitle = Replace(strTitle,ChrW(8230),”.”)

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Posted in code.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.