Replacing special characters and symbols in word documents.

Posted on 2004-10-17
Medium Priority
Last Modified: 2010-05-02
Is there any VB script for replacing special characters & symbols like chr(172).
Question by:micazone
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

_agj_ earned 375 total points
ID: 12336308
do u just want to replace a single character?
 in that case:

OutString = Replace(Instring, chr(172), "")

if u want to take off all non-numeric characters, for eg...

jus have a loop like:

i = 1
while i < len(Instring)
if not IsNUmeric(mid(Instring,i,1)) then mid(Instring,i,1) = chr(0)
OutString = Replace(Instring, chr(0), "")


Author Comment

ID: 12358616
I need to replace multiple special chracters but unfortunately VB does not recognize some of the charcter codes like ChrW(8220), ChrW(960,962,963).
Can u help please with a suitable script.

Author Comment

ID: 12368392
How to put your code in VB?
Chr(172) not at all being found or replaced by word. Can u solve this please.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question