M
Martin
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!
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!