Tech Support Guy banner
Status
Not open for further replies.
1 - 4 of 4 Posts

·
Registered
Joined
·
521 Posts
Discussion Starter · #1 ·
XP Pro Ver 2002 SP2 + updates
M$Word2003

I have a bunch of Word documents that contain multiple occurrences of a character that displays itself as a medium size dot in Symbol font and as a small rectangle in CG Times font. I want to replace all occurrences of this character with a slightly larger dot, specifically the ascii 0149 character. I could do this manually but I would rather use Find & Replace.

My problem is that I cannot determine the ascii code of the dot to be replaced. If I select and copy the dot and then paste it into the Find box, I get a message that says 'The search item was not found.' If I use the Macro shown below, I am told that the ascii code is 0063, which is obviously not correct because 0063 is the question mark character.

WordBasic.MsgBox "The search string is ^" + WordBasic.[Right$]("00" + WordBasic.[LTrim$](Str(Asc(WordBasic.[Selection$]()))), 3)

So (1), how do I determine the ascii code of this unknown 'dot' character so I can search for it?

And (2), would someone be kind enough to convert the above Macro code (left over from Word6 of many years ago) to whatever Word2003 now uses? Thank you.

P.S.: I somehow inserted this dot myself into my Word6 documents many years ago and cannot remember how I did it. It has been carried forward and reproduced in many other documents as I moved from Word6 to Word97 to Word2003.
 

·
Registered
Joined
·
521 Posts
Discussion Starter · #2 ·
Bump. Progress to date:

(1) The unknown 'dot' character is Microsoft's version of Unicode 61623. It can be searched for by entering '^u61623' in the 'Find what:' box in the 'Find and Replace' command. I found this code via the Word2003 Menu bar at 'Tools > Customize... > Keyboard... > Categories: All Commands > Commands: Symbol:'.

(2) The best I can come up with is the following:

Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Code = MsgBox("The Asc() code is ^" & Str(Asc(Selection.Characters(1).Text)) & vbNewLine & "The AscW() code is ^" & Str(AscW(Selection.Characters(1).Text)))

However, this coding gives ambiguous answers for ascii characters >127. For my 'dot', now known to be Unicode 61623, the Macro gives a value of '63' for Asc() and '-3913' for AscW(), neither of which is correct, at least in the context where I'm trying to use it. So I'm still trying to figure this one out.

But I now have enough information to search for and replace my unknown 'dot' in my Word2003 documents.
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top