Searching for a style without footnote markers

C

Carlos Chalhoub

Hi listmates,

I need to put in a string variable the result of a search on style "Heading
1". The string needed is surrounded by footnote markers (before) and a
paragraph mark (after). Ex:

# $ + K @ Immediate Annuities¶

I need the search to find "Immediate annuities". I tried searching with
wildcards, but with no success. Any ideas?

Thanks
Carlos
 
K

Klaus Linke

Hi Carlos,

Not quite sure what you want to search for, and what you then want to do
with it.

But perhaps this bit will get you started: Footnote and endnote
references/markers seem to have the ASCII code 2 internally, so you can
look for them using ^2 in wildcard searches (where ^f/^e don't work).
To match from the footnote to the end of the para, you could search for
"^2*^13".
After you have matched that, you could read the selection.text into a
string, and remove Chr(2) and Chr(13).

Regards,
Klaus
 
C

Carlos Chalhoub

Hi Klaus,

Something weird is happening. I tried ^2 (with wildcards) and ^f (without
wildcards), but Word can't find the footnote markers. I tried Goto (F5)
footnote, and Word jumped without any problem to the first footnote marker.
I changed the custom markers (#, $, +, K, @) to AutoNumber, and the search
worked. Is there a limitation in the search as to the custom markers?

Do you have a link to a list of the ASCII codes that can be used in a search
with wildcards. That can be quite handy?

Thanks, Klaus
Carlos
 
K

Klaus Linke

Hi Carlos,

I didn't know about that problem with custom footnote markers :-(

The only "complete" list of placeholders and ASCII codes that I'm aware of
is in the German book on Word by Cindy Meister and other MVPs (p. 231/232).

But in most cases, either the placeholder from normal searches works, or
nothing at all (such as with field braces ^d = ^19/^21).

So the only "interesting" codes are ^2 for footnotes/endnotes (instead of
^f/^e), and ^13 instead of ^p for ¶ marks.

^12 and ^m match both page breaks and section breaks in wildcard matches,
whereas in normal searches, ^m matches page breaks and ^b section breaks.

Some of the "not so interesting" codes: ^1 = ^g = picture, ^5 = ^a =
comment marker, ^11 = ^l = manual line break, ^14 = ^n = column break, ^31
= ^- = optional hyphen.

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top