Matt said:
It is to make a sort of treasure hunt for student learning how to use word
so
when the have but their name in the footer it will then give them to more
pages in the document and add some text to the document
The WindowSelectionChange event fires whenever you change the position of
the selection using the mouse or the arrow keys you could have this event
test for the presence of the user's name in the footer, and add the pages if
it is present. (You would need to set a flag so that you only add the extra
pages once)
This would cause the pages to be added when the use comes out of the
header/footer view.
For how to use application event procedures such as WindowSelectionChange,
take a look at this article
Writing application event procedures
http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org