Can anyone recommend any decent references/documentation on this subject??

One specific problem is when doing a search and replace on text of the document, how do I include page headers and footers in the search????