I'm working with VBA automation in Word 2007. I have two symbols I'm using extensively in a document template. On the Word Insert menu they show up as Wingdings character code 114 (a 3D-looking checkbox), and Wingdings character code 166 (a 3D-looking radio button). When I use the macro recorder and insert these 2 characters, I get the code below. So I know how to insert them programmatically. When I record a search and replace with these symbols pasted in, they show up as ChrW (61544) and ChrW(61606). So I know they have at least 3 numerical equivalents, but I don't know which numbers to use and how to do the following:
1. Recognize a symbol.
a. I use code to go to a given table cell and select the first character of the contents.
b. I want to know whether the selection is one of these two symbols. If it were plain text, I could say "If selection = "X". But how can I find out "if selection = Wingdings character code 114 ( = character number -3930 = ChrW (61554) ) ?
2. How to search for one and replace it with the other.
Similar question. What VBA code would I use to search for one of these symbols and replace it with the other?
Thanks for you help!
' this is a 3D checkbox
Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3982, Unicode _
'this is a 3D radio button
Selection.InsertSymbol Font:="Wingdings", CharacterNumber:=-3930, Unicode _