Re: Find/replace in all areas of document
- From: "Charles Kenyon" <wordfaq@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 13 Jun 2006 11:11:30 -0500
At http://www.gmayor.com/installing_macro.htm you'll find a macro for
updating fields in all stories. It may help you in writing your own.
--
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
"Martin" <Martin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D8E2AA6F-38B1-470A-9754-D3819EDA6196@xxxxxxxxxxxxxxxx
As a solution to a problem I'm having with a bar code font, I'm creating a
macro to find/replace throughout a document. However, I would like to
perform the same find/replace in every area of the document: the main
body,
headers and footers (current, odd/even, first page), footnotes and
endnotes,
text boxes, etc.
I've sorted out the correct code to run the find/replace I need but I'm
looking for a way in VBA to access all of these different areas. Ideas
I've
had include SeekView and Story but they don't seem to have constants for
odd
headers/footers (though they curiously have ones for even pages!). Is
there
a collection - with a corresponding object variable - that can be
conveniently used? Or any other methods (I guess I can always use an
error
handler to cope with documents that don't contain every particular area)?
Text boxes seem to be the toughest to write generic code for.
My plan is to then run this macro on each of several hundred templates we
need to change so I need it to be pretty flexible.
Hope you can help!
.
- Prev by Date: Re: How do I create an message box when opening a Word document?
- Next by Date: Help With Macro WordList to BBCodeList
- Previous by thread: Re: How do I create an message box when opening a Word document?
- Next by thread: Re: Find/replace in all areas of document
- Index(es):
Relevant Pages
|