How to insert page number X of Y ?

B

Blue Max

We want a footer that includes "Page X of Y" where X equals the page number
and Y equals total pages. The problem, however, is that our footers often
already exists and includes a fair amount of custom design work. In our
experience, selecting a page number from the gallery with the proper format,
replaces the existing footer.

Therefore, how does one simply insert the codes for 'current page' and
'total pages' into the existing text of the footer in order to preserve the
current design?
 
J

Jay Freedman

Blue said:
We want a footer that includes "Page X of Y" where X equals the page
number and Y equals total pages. The problem, however, is that our
footers often already exists and includes a fair amount of custom
design work. In our experience, selecting a page number from the
gallery with the proper format, replaces the existing footer.

Therefore, how does one simply insert the codes for 'current page' and
'total pages' into the existing text of the footer in order to
preserve the current design?

On the Insert > Page Number button, choose the Current Position item instead
of the Bottom of Page item, and choose the Page X of Y entry from that
gallery. It will probably also insert a paragraph mark formatted with Normal
style, which you'll have to delete so the remaining paragraph mark is
formatted in Footer style.

A better solution is to make an AutoText or AutoComplete entry from the text
of the Page X of Y entry, without its paragraph mark, and insert that when
needed instead of using the Page Number button.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
B

Blue Max

Thank you for the explanation, Jay. Your last paragraph intrigues me, but
you also lost me. Is it possible you are saying we can simply insert the
codes for current page and total pages somehow? Could you explain a little
further how we do what you are describing in the last paragraph addressing a
'better solution'?

Other programs allow you to type in the text and simply insert the automated
codes, where needed, one at a time. Not sure why it seems to be so
difficult in Word.

Thanks,
Richard

***************
 
S

Suzanne S. Barnhill

You can insert any field by pressing Ctrl+F9 to insert the field braces and
then typing the field name between them. In this case the relevant fields
are PAGE and NUMPAGES.
 
J

Jay Freedman

Hi Richard,

As Suzanne says, you _can_ insert fields one at a time, each time you want
them. Being lazy, though, I would prefer to package the entire "Page {PAGE}
of {NUMPAGES}" construct into an AutoCorrect entry so it takes only a few
keystrokes to drop it into a footer.

First type the whole expression into some document, using Ctrl+F9 to create
the field braces, and select all of it. Go to Office button > Word Options >
Proofing > AutoCorrect Options. In the dialog that opens, the selected text
will be in the box on the right labeled "With". In the box to its left
labeled "Replace", type an abbreviation that you aren't likely to type for
any other reason -- for example, pxy -- and click the Add button.

Now, any time you type that abbreviation followed by a space or punctuation,
it will automatically be replaced by the Page X of Y expression.

There's more about AutoCorrect at
http://www.word.mvps.org/FAQs/Customization/AutoCorrect.htm. Although the
article was written for Word 2003 and earlier, the only thing that's
different about it in Word 2007 is the path to the AutoCorrect Options
dialog.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
B

Blue Max

Thank you Suzanne, this is wonderful! In fact, it opens up a whole new set
of options we enjoyed in other applications, but did not know how to do in
Word. However, this begs one more question: Where do we find a listing of
all the codes that can be inserted into word in this fashion?

Thank you very much,
Richard

*******************
 
B

Blue Max

Thank you, Jay. I really appreciate your insights, along with those of
Suzanne. Your reply takes the automation one step further, which we
appreciate greatly. This aspect also opens up some great possibilities for
codes that we were not aware of until now.

Thank you very much,
Richard

*************
 
B

Blue Max

Forgive me Jay, but a few more questions just occured to me. FIRST, are any
of these standard codes available from the toolbars or menu system in Word
2007? There is something vaguely familiar about these codes, as if I have
seen them elsewhere in the menus. SECOND, as I asked Suzanne, where might
we find a listing of these codes. THIRD, are these codes part of a larger
set of codes, such as data 'merge' codes or 'Visual Basic' codes?

Thanks,
Richard
 
J

Jay Freedman

Hi Richard,

To answer your first question, the field codes aren't visible on toolbars or
menus in any version of Word, but they can be seen in the Insert Field dialog
(in Word 2007, Insert > Quick Parts > Field) if you click the Field Codes button
in the lower left corner of the dialog. Other than that, you'd see them only if
you toggled from field results to field codes with Alt+F9 (or Shift+F9 for a
single field).

The place to find a list of all field types is in the Insert Field dialog that I
just mentioned. Unfortunately, the Help topics that explain the purpose and
syntax of specific fields are fairly spotty in Word 2007, and what is there is
poorly indexed and hard to find. A better resource is to use Office Online,
which contains the Word 2003 help topics on fields starting at
http://office.microsoft.com/en-us/word/CH061047231033.aspx.

The list of fields should answer the part of your third question about whether
they're part of a larger set: 'merge' codes are simply a subset of field codes.
Visual Basic for Applications (VBA), however, is an entirely different and much
larger topic. Start with
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm and
http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. If you want to pursue
this further, start reading the other articles on the MacrosVBA section of the
site, and post questions in microsoft.public.word.vba.beginners.
 
B

Blue Max

Thank you again Jay. I profoundly appreciate your insight into this area.
We are slowly transitioning from another wordprocessor and have struggled to
find the automated equivalents in Microsoft Word. The field listings under
'Quick Parts' is exactly what we were looking for and is, most certainly,
where we must have seen these codes before in some sample online
illustration.

I don't know about others, but we often struggle with the 'Help' feature in
Microsoft Office. Perhaps, it's a function of our unfamiliarity with
Microsoft terms or definitions, but it can oft times be very frustrating to
find help on certain, even basic, subjects.

Thank you again,
Richard

***************************
 
S

Suzanne S. Barnhill

Well, that should be "slowly improving." A recent update is available for
Word 2007 Help (also for Excel and other Office apps). Presumably this
installs some of the Help topics previously available only online, but it
doesn't increase the total number of Help topics available--just makes more
of them available offline.
 
B

Blue Max

Thank you Suzanne, you have been very helpful. I will review the links you
have provided. Meanwhile, it is nice to know that we are not the only ones
who have struggled with the help engine. We simply can't innumerate how
many times, to our amazement, that we have performed a simple search, often
using a very common term, where the search results have produced a ton of
garbage (no solid hits, even at the top of the list).

Thanks,
Richard

***************
 
B

Blue Max

Sorry, Suzanne, but I did have one other question. Are the French brackets
"{}" that enclose the fieldname codes a special character also, or can we
simply use the keyboard characters (usually available above the shifted
square brackets "[ ]") ?

Thanks,
Richard

*********************
 
H

Herb Tyson [MVP]

Braces {} must be entered using Ctrl+F9 if you're manually creating a field
code. If you're using one of a number of other ways to create a field, the
braces are created automatically by Word.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


Blue Max said:
Sorry, Suzanne, but I did have one other question. Are the French
brackets "{}" that enclose the fieldname codes a special character also,
or can we simply use the keyboard characters (usually available above the
shifted square brackets "[ ]") ?

Thanks,
Richard

*********************
Suzanne S. Barnhill said:
Well, that should be "slowly improving." A recent update is available for
Word 2007 Help (also for Excel and other Office apps). Presumably this
installs some of the Help topics previously available only online, but it
doesn't increase the total number of Help topics available--just makes
more of them available offline.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
 
J

Jay Freedman

The brackets -- which are field delimiters -- are most definitely special
characters. As Suzanne mentioned in a post very far down this thread, you press
Ctrl+F9 to insert the pair and then type the field code between them. Simply
typing the keyboard characters will _not_ work; all you'll have then is text,
not a field.

Jay

Sorry, Suzanne, but I did have one other question. Are the French brackets
"{}" that enclose the fieldname codes a special character also, or can we
simply use the keyboard characters (usually available above the shifted
square brackets "[ ]") ?

Thanks,
Richard

*********************
Suzanne S. Barnhill said:
Well, that should be "slowly improving." A recent update is available for
Word 2007 Help (also for Excel and other Office apps). Presumably this
installs some of the Help topics previously available only online, but it
doesn't increase the total number of Help topics available--just makes
more of them available offline.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
 
B

Blue Max

Thank you very much, Herb. You also mentioned other ways to create a field,
what might those be?

Thanks,
Richard

**********************
Herb Tyson said:
Braces {} must be entered using Ctrl+F9 if you're manually creating a
field code. If you're using one of a number of other ways to create a
field, the braces are created automatically by Word.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


Blue Max said:
Sorry, Suzanne, but I did have one other question. Are the French
brackets "{}" that enclose the fieldname codes a special character also,
or can we simply use the keyboard characters (usually available above the
shifted square brackets "[ ]") ?

Thanks,
Richard

*********************
Suzanne S. Barnhill said:
Well, that should be "slowly improving." A recent update is available
for Word 2007 Help (also for Excel and other Office apps). Presumably
this installs some of the Help topics previously available only online,
but it doesn't increase the total number of Help topics available--just
makes more of them available offline.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

The Help in Word 2007, though slowly improvely, is still pretty
hopeless. The Word 2003 Help topics on field codes can be found
starting at
http://office.microsoft.com/en-us/word/CH100992711033.aspx?stt=1

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Thank you again Jay. I profoundly appreciate your insight into this
area. We are slowly transitioning from another wordprocessor and have
struggled to find the automated equivalents in Microsoft Word. The
field listings under 'Quick Parts' is exactly what we were looking for
and is, most certainly, where we must have seen these codes before in
some sample online illustration.

I don't know about others, but we often struggle with the 'Help'
feature in Microsoft Office. Perhaps, it's a function of our
unfamiliarity with Microsoft terms or definitions, but it can oft
times be very frustrating to find help on certain, even basic,
subjects.

Thank you again,
Richard

***************************
Hi Richard,

To answer your first question, the field codes aren't visible on
toolbars or
menus in any version of Word, but they can be seen in the Insert
Field dialog
(in Word 2007, Insert > Quick Parts > Field) if you click the Field
Codes button
in the lower left corner of the dialog. Other than that, you'd see
them only if
you toggled from field results to field codes with Alt+F9 (or
Shift+F9 for a
single field).

The place to find a list of all field types is in the Insert Field
dialog that I
just mentioned. Unfortunately, the Help topics that explain the
purpose and
syntax of specific fields are fairly spotty in Word 2007, and what is
there is
poorly indexed and hard to find. A better resource is to use Office
Online,
which contains the Word 2003 help topics on fields starting at
http://office.microsoft.com/en-us/word/CH061047231033.aspx.

The list of fields should answer the part of your third question
about whether
they're part of a larger set: 'merge' codes are simply a subset of
field codes.
Visual Basic for Applications (VBA), however, is an entirely
different and much
larger topic. Start with
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm and
http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. If you want to
pursue
this further, start reading the other articles on the MacrosVBA
section of the
site, and post questions in microsoft.public.word.vba.beginners.

Forgive me Jay, but a few more questions just occured to me. FIRST,
are any
of these standard codes available from the toolbars or menu system in
Word
2007? There is something vaguely familiar about these codes, as if I
have
seen them elsewhere in the menus. SECOND, as I asked Suzanne, where
might
we find a listing of these codes. THIRD, are these codes part of a
larger
set of codes, such as data 'merge' codes or 'Visual Basic' codes?

Thanks,
Richard

Hi Richard,

As Suzanne says, you _can_ insert fields one at a time, each time
you want
them. Being lazy, though, I would prefer to package the entire
"Page
{PAGE} of {NUMPAGES}" construct into an AutoCorrect entry so it
takes only
a few keystrokes to drop it into a footer.

First type the whole expression into some document, using Ctrl+F9
to
create the field braces, and select all of it. Go to Office button
Word
Options > Proofing > AutoCorrect Options. In the dialog that opens,
the
selected text will be in the box on the right labeled "With". In
the box
to its left labeled "Replace", type an abbreviation that you aren't
likely
to type for any other reason -- for example, pxy -- and click the
Add
button.

Now, any time you type that abbreviation followed by a space or
punctuation, it will automatically be replaced by the Page X of Y
expression.

There's more about AutoCorrect at
http://www.word.mvps.org/FAQs/Customization/AutoCorrect.htm.
Although the
article was written for Word 2003 and earlier, the only thing
that's
different about it in Word 2007 is the path to the AutoCorrect
Options
dialog.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so all may benefit.

Suzanne S. Barnhill wrote:
You can insert any field by pressing Ctrl+F9 to insert the field
braces and then typing the field name between them. In this case
the
relevant fields are PAGE and NUMPAGES.


Thank you for the explanation, Jay. Your last paragraph
intrigues
me, but you also lost me. Is it possible you are saying we can
simply insert the codes for current page and total pages somehow?
Could
you explain a little further how we do what you are describing
in the last paragraph addressing a 'better solution'?

Other programs allow you to type in the text and simply insert
the
automated codes, where needed, one at a time. Not sure why it
seems
to be so difficult in Word.

Thanks,
Richard

***************
Blue Max wrote:
We want a footer that includes "Page X of Y" where X equals the
page number and Y equals total pages. The problem, however, is
that our footers often already exists and includes a fair
amount
of custom design work. In our experience, selecting a page
number
from the gallery with the proper format, replaces the existing
footer. Therefore, how does one simply insert the codes for
'current
page'
and 'total pages' into the existing text of the footer in order
to
preserve the current design?

On the Insert > Page Number button, choose the Current Position
item
instead of the Bottom of Page item, and choose the Page X of Y
entry from that gallery. It will probably also insert a
paragraph
mark formatted with Normal style, which you'll have to delete so
the remaining paragraph mark is formatted in Footer style.

A better solution is to make an AutoText or AutoComplete entry
from
the text of the Page X of Y entry, without its paragraph mark,
and
insert that when needed instead of using the Page Number button.
 
B

Blue Max

Thank you, Jay. I apparently overlooked Suzanne's instruction to use the
CTRL-F9 key.

***********************************
Jay Freedman said:
The brackets -- which are field delimiters -- are most definitely special
characters. As Suzanne mentioned in a post very far down this thread, you
press
Ctrl+F9 to insert the pair and then type the field code between them.
Simply
typing the keyboard characters will _not_ work; all you'll have then is
text,
not a field.

Jay

Sorry, Suzanne, but I did have one other question. Are the French
brackets
"{}" that enclose the fieldname codes a special character also, or can we
simply use the keyboard characters (usually available above the shifted
square brackets "[ ]") ?

Thanks,
Richard

*********************
Suzanne S. Barnhill said:
Well, that should be "slowly improving." A recent update is available
for
Word 2007 Help (also for Excel and other Office apps). Presumably this
installs some of the Help topics previously available only online, but
it
doesn't increase the total number of Help topics available--just makes
more of them available offline.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

The Help in Word 2007, though slowly improvely, is still pretty
hopeless.
The Word 2003 Help topics on field codes can be found starting at
http://office.microsoft.com/en-us/word/CH100992711033.aspx?stt=1

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Thank you again Jay. I profoundly appreciate your insight into this
area. We are slowly transitioning from another wordprocessor and have
struggled to find the automated equivalents in Microsoft Word. The
field listings under 'Quick Parts' is exactly what we were looking for
and is, most certainly, where we must have seen these codes before in
some sample online illustration.

I don't know about others, but we often struggle with the 'Help'
feature
in Microsoft Office. Perhaps, it's a function of our unfamiliarity
with
Microsoft terms or definitions, but it can oft times be very
frustrating
to find help on certain, even basic, subjects.

Thank you again,
Richard

***************************
Hi Richard,

To answer your first question, the field codes aren't visible on
toolbars or
menus in any version of Word, but they can be seen in the Insert
Field
dialog
(in Word 2007, Insert > Quick Parts > Field) if you click the Field
Codes button
in the lower left corner of the dialog. Other than that, you'd see
them
only if
you toggled from field results to field codes with Alt+F9 (or
Shift+F9
for a
single field).

The place to find a list of all field types is in the Insert Field
dialog that I
just mentioned. Unfortunately, the Help topics that explain the
purpose
and
syntax of specific fields are fairly spotty in Word 2007, and what is
there is
poorly indexed and hard to find. A better resource is to use Office
Online,
which contains the Word 2003 help topics on fields starting at
http://office.microsoft.com/en-us/word/CH061047231033.aspx.

The list of fields should answer the part of your third question
about
whether
they're part of a larger set: 'merge' codes are simply a subset of
field codes.
Visual Basic for Applications (VBA), however, is an entirely
different
and much
larger topic. Start with
http://word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm and
http://word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm. If you want to
pursue
this further, start reading the other articles on the MacrosVBA
section
of the
site, and post questions in microsoft.public.word.vba.beginners.

Forgive me Jay, but a few more questions just occured to me. FIRST,
are any
of these standard codes available from the toolbars or menu system in
Word
2007? There is something vaguely familiar about these codes, as if I
have
seen them elsewhere in the menus. SECOND, as I asked Suzanne, where
might
we find a listing of these codes. THIRD, are these codes part of a
larger
set of codes, such as data 'merge' codes or 'Visual Basic' codes?

Thanks,
Richard

Hi Richard,

As Suzanne says, you _can_ insert fields one at a time, each time
you
want
them. Being lazy, though, I would prefer to package the entire
"Page
{PAGE} of {NUMPAGES}" construct into an AutoCorrect entry so it
takes
only
a few keystrokes to drop it into a footer.

First type the whole expression into some document, using Ctrl+F9
to
create the field braces, and select all of it. Go to Office button

Word
Options > Proofing > AutoCorrect Options. In the dialog that opens,
the
selected text will be in the box on the right labeled "With". In
the
box
to its left labeled "Replace", type an abbreviation that you aren't
likely
to type for any other reason -- for example, pxy -- and click the
Add
button.

Now, any time you type that abbreviation followed by a space or
punctuation, it will automatically be replaced by the Page X of Y
expression.

There's more about AutoCorrect at
http://www.word.mvps.org/FAQs/Customization/AutoCorrect.htm.
Although
the
article was written for Word 2003 and earlier, the only thing
that's
different about it in Word 2007 is the path to the AutoCorrect
Options
dialog.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup
so all may benefit.

Suzanne S. Barnhill wrote:
You can insert any field by pressing Ctrl+F9 to insert the field
braces and then typing the field name between them. In this case
the
relevant fields are PAGE and NUMPAGES.


Thank you for the explanation, Jay. Your last paragraph
intrigues
me, but you also lost me. Is it possible you are saying we can
simply insert the codes for current page and total pages somehow?
Could
you explain a little further how we do what you are describing
in the last paragraph addressing a 'better solution'?

Other programs allow you to type in the text and simply insert
the
automated codes, where needed, one at a time. Not sure why it
seems
to be so difficult in Word.

Thanks,
Richard

***************
Blue Max wrote:
We want a footer that includes "Page X of Y" where X equals the
page number and Y equals total pages. The problem, however, is
that our footers often already exists and includes a fair
amount
of custom design work. In our experience, selecting a page
number
from the gallery with the proper format, replaces the existing
footer. Therefore, how does one simply insert the codes for
'current
page'
and 'total pages' into the existing text of the footer in order
to
preserve the current design?

On the Insert > Page Number button, choose the Current Position
item
instead of the Bottom of Page item, and choose the Page X of Y
entry from that gallery. It will probably also insert a
paragraph
mark formatted with Normal style, which you'll have to delete so
the remaining paragraph mark is formatted in Footer style.

A better solution is to make an AutoText or AutoComplete entry
from
the text of the Page X of Y entry, without its paragraph mark,
and
insert that when needed instead of using the Page Number button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top