Customized page numbers in footer (harvested from text)
You should be able to use STYLEREF fields for this. Create two unique
character styles and apply one of them to the "88" and the other one to "89"
(and similarly, using the same pair of styles, for other pages in the
document). In the footer, add { STYLEREF "Name of first char style" }–{
STYLEREF "Name of second style" }.
You can insert the field codes via Insert tab | Quick Parts | Field.
Alternatively, you can insert them manually: Press Ctrl+F9 to insert each
pair of field delimiters, { }, and then type in the code as shown above.
--
Stefan Blom
Microsoft Word MVP
---------------------------------------------
"RickR" wrote in message ...
I need to add custom page numbers to the footer of each page of a Word
2010 document. The custom page number will be harvested from one or more
occurrences of the snippets "[Page xx]" appearing within the text on the
page: For example, say "[Page 88]" and "[Page 89]" are found within the
text appearing on a given page (separated by a few lines of text). From
these, I will then place "88-89" in the footer for that page. (The
customized numbers therefore have nothing to do with the actual page
numbers of the document.) The fields should populate when the document
is opened. I understand rudimentary VBS macro programming, how to insert
fields, etc. Thank you very much.
--
RickR
|