Solved

Replacing special characters and symbols in word documents.

Posted on 2004-10-17
4
245 Views
Last Modified: 2010-05-02
Is there any VB script for replacing special characters & symbols like chr(172).
Shyam
0
Comment
Question by:micazone
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12332063
0
 
LVL 7

Accepted Solution

by:
_agj_ earned 125 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)
wend
OutString = Replace(Instring, chr(0), "")


similiarly
0
 

Author Comment

by:micazone
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.
0
 

Author Comment

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now