E
Edward Mendelson
I'm writing a macro that needs to test certain strings inside a field code
and make decisions on that basis, and I hope someone can suggest how to test
for the strings inside the code.
Here is the problem:
In a document that contains Symbol fields, I toggle field codes visible,
then I search for the string
^19symbol
This takes me to the first symbol field. The content of the field looks
something like this:
{symbol 65 \f "WP TypographicSymbols" \s 12}
(the curly braces are of course really the opening and closing field codes)
65 is the symbol number, "WP TypographicSymbols" is the font name.
What I want to do is put the symbol number and font name into variables, so
that I can run a Select Case test, first on the font name, then on the
symbol number, to determine what to do next.
Very conveniently, Word will replace these fields even if you do not specify
the full text of the field, so the macro can find
^19symbol 65 \f "WP Typ
and replace it with a quotation mark, and the find-replace will succeed.
Many thanks for any help in extracting those two variables from the field
codes.
Edward Mendelson
and make decisions on that basis, and I hope someone can suggest how to test
for the strings inside the code.
Here is the problem:
In a document that contains Symbol fields, I toggle field codes visible,
then I search for the string
^19symbol
This takes me to the first symbol field. The content of the field looks
something like this:
{symbol 65 \f "WP TypographicSymbols" \s 12}
(the curly braces are of course really the opening and closing field codes)
65 is the symbol number, "WP TypographicSymbols" is the font name.
What I want to do is put the symbol number and font name into variables, so
that I can run a Select Case test, first on the font name, then on the
symbol number, to determine what to do next.
Very conveniently, Word will replace these fields even if you do not specify
the full text of the field, so the macro can find
^19symbol 65 \f "WP Typ
and replace it with a quotation mark, and the find-replace will succeed.
Many thanks for any help in extracting those two variables from the field
codes.
Edward Mendelson