Re: Find/replace in all areas of document

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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!


.



Relevant Pages

  • Re: Macro Text on Command Button gone in email
    ... Word New User FAQ & Web Directory: http://addbalance.com/word ... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... This message is posted to a newsgroup. ... That said, though, make sure either way that your macro is stored in your ...
    (microsoft.public.word.docmanagement)
  • Re: Placing a macro in autocorrect
    ... Word New User FAQ & Web Directory: http://addbalance.com/word ... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... This message is posted to a newsgroup. ... Why would you have a macro for bold? ...
    (microsoft.public.word.docmanagement)
  • Re: Macros in Word 2003 with SP2
    ... On those systems the macro security needs to be set to trust installed ... Word New User FAQ & Web Directory: http://addbalance.com/word ... "Charles Kenyon" wrote: ... global templates are stored in the Word startup folder and not the ...
    (microsoft.public.word.vba.customization)
  • Re: Form with macro for mulitple users
    ... 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 ... the macro is attached to the last txt box's OnExit property. ...
    (microsoft.public.word.docmanagement)
  • Re: spell checker on form
    ... Word New User FAQ & Web Directory: http://addbalance.com/word ... Microsoft's Legal Users' Guide) http://addbalance.com/usersguide ... Is there a different Macro for a newer version? ...
    (microsoft.public.word.spelling.grammar)