MY macro is choking on footnotes

  • Thread starter Thread starter Ken
  • Start date Start date
K

Ken

I have a large document (100_ pages), full of footnotes. I
have written my first macro. This macro needs to find every
occurrence in my document (both main body and every single
footnote) and change the Greek words from one Greek font to
another. The macro does fine for the main text, but it
chokes on footnotes. I ran it once to change all the
citations of Greek in the main text but for every single
footnote, I have had to run the macro separately. That
means every single time there's even one Greek word in a
footnote, I have to wait three or four minutes while Word
repaginates the document because of this one tiny change.

How can I get Word to run the macro against every
single line of the entire document, main text and footnotes,
in just one pass? This is pretty silly. I'm not an
advanced Word user by any means, but I can do what I want in
WordPerfect. Unfortunately, I have to deliver my document
as a Word file instead, so I need to convert it to Word.
Thanks.


Ken
 
Hi Ken

In Word, you don't need a macro to do what you want.

Use Edit > Replace. Leave both the "Find What" and the "Replace With" boxes
blank. Click More. Now, click in the Find What box, click Format > Font and
choose the font you want to find. Click in the Replace With box and choose
the font you want to replace it with. Click Replace All.

On my machine that will change the font in both the body of the document and
footnotes.

If you do want to use a macro, you will need to cycle through the various
StoryRanges. You could use the UpdateAll macro at
http://www.gmayor.com/installing_macro.htm as the basis for your macro.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
Thanks for the reply Shauna. Unfortunately, merely
finding the font is not enough. I am replacing one font,
which, for example, maps a Greek Xi to the X on the
keyboard, while the font I'm going to uses the X key to map
the Greek character Chi. I have a macro to tell Word on a
character-by-character basis exactly what to replace what
with. Thanks.


Ken
 
Hi Ken,

Late reply....

I'm not a VBA expert *at all*, but assume the macro consists of a lot of
Find&Replace operations? Those should go directly to the footnote level
after doing the main text, w/o a problem, as Shauna said.

can you test your macro on a doc created entirely in Word? Anyhow, what I'm
getting at is that many people have reported footnotes not behaving entirely
correctly in documents that were converted from WordPerfect, and I would
suspect that could be causing the problem where the macro stops at the end
of every note.

Also, if you are in Normal view (and click View | Footnotes), then Word
shouldn't repaginate. For this operation, you might want to switch.

DM
 
Back
Top