How do I insert a page number in Word that copies and pastes?

arthurh88 used Ask the Experts™
I create a text box in word.  I insert the page number.   I then copy that text box, complete with the page number, to a new page.  The new page shows the old page number, not the new one.  How can I create a text box with a variable page number that will show the page number whereever I copy/paste that text box?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The page number is a field and before it shows the correct page, it needs to be updated. Normally, if you wanted to update all fields at once you would select the entire document (Ctrl+A) and then press F9. This, however, will not work for a field within a text box. You can go to each text box, right-click field and select Update Field; or you can run this macro:
Sub UpdateTBFlds()
Dim shp As Shape
  For Each shp In ActiveDocument.Shapes
    With shp.TextFrame
      If .HasText Then
      End If
    End With
End Sub

Open in new window

Dimitris MaleasData recovery engineer

insert a PAGE field with Alt+Shift+P to first text box.Copy/paste and right click in number --> update field
John KorchokProduction Manager

Let's keep it simple! In the text box, right-click on the page number field and choose Update Field.


that macro is slick.  thank you!
You're welcome. Glad it worked out for you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial