Add number of pages after page number - Publisher 2007


  • Hello,

    I need to add the total number of pages after the current page number in Publisher 2007. For example, I need to have "Page 1 of 7" or something similar to that. I know how to have Publisher add the current page number, but how do you add the total number of pages?

    Thank you,
    Friday, October 12, 2012 6:47 PM


  • Hi Kris,

    As far as I know, there is no such built-in feature in Publisher to add Page X of Y.

    Alternately, here is a macro sample to add the page number which is shared by another community member:

    Sub NumberT()
    Dim strPageNumber As String
     Dim x As Integer
     For x = 1 To Pages.Count
         With ActiveDocument.Pages(x)
             strPageNumber = .PageNumber
             .Shapes.AddTextbox(Orientation:=pbTextOrientationHorizontal, _
                 Left:=710, Top:=580, Width:=80, Height:=20) _
                 .TextFrame.TextRange.InsertAfter NewText:="Page " _
                 & strPageNumber & " of " & .Parent.Count & "."
         End With
     Next x
    End Sub

    Max Meng

    TechNet Community Support

    Tuesday, October 16, 2012 9:56 AM