Software

Save time by using field codes to insert page numbers

If all your document footer needs are page numbers, try this quick field code approach to inserting them. You'll save time and mouse clicks in the process.

When you want to add page numbers to a document header or footer, you can use menu commands. However, if all you need is to do is quickly add a page number to the bottom of your pages, you may save time and mouse clicks by following these steps:

  1. Click in the footer pane where you want the page number to appear.
  2. Type PAGE at the insertion point.
  3. Double-click PAGE to select it.
  4. Press Ctrl + F9.

To update the field code so that the actual page number displays, click {PAGE} and then press F9. All your pages are now numbered at the bottom left. You can format the numbers as required. For example, if you want them centered on the page, click the number and then click the Center button.


Miss a Word tip?

Check out the Microsoft Word archive and catch up on other Word tips.

Help users increase productivity by automatically signing up for TechRepublic's free Microsoft Office Suite newsletter, featuring Word, Excel, and Access tips, delivered each Wednesday.

6 comments
mharris672
mharris672

Thanks for the tip! This works great. I also like to utilize "Page x of y" throughout most of my documents.

Tante Waileka
Tante Waileka

Here is the macro you need for page x of y. save it in the normal.dot file. >> Sub pagexofy() ' Selection.TypeText Text:="Page " Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.TypeText Text:="page" Selection.MoveRight Unit:=wdCharacter, Count:=2 Selection.TypeText Text:=" of " Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False Selection.TypeText Text:="numpages" Selection.MoveRight Unit:=wdCharacter, Count:=2 Selection.MoveLeft Unit:=wdCharacter, Count:=24 Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _ PreserveFormatting:=False End Sub

Tante Waileka
Tante Waileka

(don't use any of the 'quotes') Start recording a macro, attach it to Keyboard ALT + P, if that is not assigned Type 'Page ' Hold down CTRL key and press F9 Type 'page' Arrow to the right twice Type ' of ' Hold down CTRL key and press F9 Type 'numpages' Arrow to the right twice Hold down CTRL, SHIFT and arrow to the left 4 times (that will highlight Page {page} of {numpages}) Press F9 press right arrow once. end the macro (I despise Word 2007, as you have 'reinvent the wheel' for everything that was nicely provided in 2000-3 versions, sigh.)

Violetw
Violetw

if you create a series of macros, and assign each to the keyboard, then save the doc as a template, you don't need to create the macros again and you don't have to use the commands (which are, at best, incomplete for any feature).

Minstrel Mike
Minstrel Mike

Seems like a template would be the way to go. Can you save hdr/ftr stuff there? I get mixed-up between all the different word processors around.

canajian_eh
canajian_eh

Seems that it's not worth the time and effort to go thru this in Word 2007. Skip the macro stuff and use the commands.