[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Replacing special characters and symbols in word documents.

Posted on 2004-10-17
4
Medium Priority
?
262 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 7

Accepted Solution

by:
_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)
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

864 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