Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2003
    Location
    Elkins Park, Pennsylvania, USA
    Posts
    325
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding Symbols (Word XP)

    Hi again.
    Some time ago, I found a handy piece of code in here that allowed me to find symbols (those inserted with the Insert Symbol command and selected from a font other than "(normal font)".) With it, I created some now often-used tools to navigate through the document.
    <font face="Georgia">
    With Selection.Find
    ' this will find all (protected and unprotected) symbols:
    <font color=red>.Text = "[" & ChrW(61472) & "-" & ChrW(61695) & "]"</font color=red>
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchWildcards = True
    .Execute
    End With</font face=georgia>

    Recently, I've been trying to configure a third-party tool (DocXamine) to locate/identify all instances of symbols inserted in this manner. The hitch is that I need to supply the search string as it would be typed after "Find what:" in the Edit Find dialog box. Does anyone know how I should approach this? Can it even be done directly via the dialog box? (And just what is the technical term for symbols inerted this way? I don't want scores of user using the wrong terminology just because I did.)
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Finding Symbols (Word XP)

    Interesting code. I believe I have seen in a past thread a way to search for a unicode character using a four-digit number. However, the number in your code is 5 digits, so I'm not sure that the unicode approach will work.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Symbols (Word XP)

    Hi Mike,

    In "Find what", type Alt+61472 and Alt+61695 in front of and after the hyphen. This works in Word2000 and above.

    Wildcard searches like that are pretty handy not only for symbols, but also for say the Greek or Cyrillic code pages. You only have to figure out the decimal code for the first and last characters on the code page.
    Symbols use a special code page starting at U+F000 (decimal 61440). But the "control codes" below the space (61440+32) aren't used.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  4. #4
    3 Star Lounger
    Join Date
    Mar 2003
    Location
    Elkins Park, Pennsylvania, USA
    Posts
    325
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Symbols (Word XP)

    Outstanding. Can I ask where I can find documentation of that sort of thing (and, hopefully, other useful information)? As the unofficial fireman here in my division, about half of the problem that I have to deal with, from Word to Adobe Acrobat to printer drivers, involve fonts and the furtive, under-the-hood manipulations that they undergo when passing from one part of the process to another. (Ah, if only there were an Adobe forum as useful as this.)
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

  5. #5
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Symbols (Word XP)

    In dialog boxes, Alt+X has worked with (decimal) Unicode since Word2000 at least. There's a bit on info on wildcard searches in the help, some more here.
    In the newer versions, it also works in the document text. I've not seen any official documentation... Maybe it's hidden somewhere in the help files.
    There's a bit on info on wildcard searches in the help, some more specific examples and tips here.

    In Word, I usually avoid symbol fonts, and use Unicode (say symbols from Arial Unicode MS or Lucida Unicode) wherever possible. But I don't have much experience creating PDFs from Word, and haven't encountered problems with symbols (from symbol fonts or Unicode fonts).

    <post#=93526>post 93526</post#> has two macros to switch symbols between their "protected state" (as they are when you insert them from "Insert > Symbol") and unprotected (as they are if you type them and set the symbol font from the font dropdow).
    The unprotected form is easier to work with say if you want to find them, the protected form is better to avoid that the symbols get clobbered when you reformat the text.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •