Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Word 2010 macro for page numbering

    I'm embarrassed to ask something so simple.

    I have just set up a letterhead template with a macro that inserts a second page and I would like to add plain page numbers centred in the footer in this macro.

    I tried recording a macro (as I can't code in VBA) but it is machine specific so I can't use it.

    Try as I did, I am unable to find VBA code for this simple task anywhere, so I would be very grateful if someone took pity on me.

    Thank you in anticipation.

    Regards
    useful

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Why do you need a macro for this, since you can configure the template to do that without a macro?

    Simply give the template a 'different first page' layout, temporarily insert a second page into the template, add the PAGE field to the second page footer, then delete the second page and save the template.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. The Following User Says Thank You to macropod For This Useful Post:

    useful (2015-08-08)

  4. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    This is not something you want a macro for. This just makes things more complex.

    How can I get a different footer on the second page (and continuation pages)?

    See also Setting Up Letter Templates.
    Charles Kyle Kenyon
    Madison, Wisconsin

  5. The Following User Says Thank You to Charles Kenyon For This Useful Post:

    useful (2015-08-08)

  6. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Quote Originally Posted by useful View Post
    I tried recording a macro (as I can't code in VBA) but it is machine specific so I can't use it.
    Macros are seldom machine-specific. It would be hard to write one that is. Recorded macros are saved by default in the normal template. When you tell Word to record a macro, it gives you the option of saving the macro in the current document or its template rather than the normal template.

    I suspect that you may be one of us who moved from Wordperfect, where macros are used for just about everything. In Word, there are a number of tools that work much better for many functions. See Word for Wordperfect Users. Recording or writing macros for those functions is beating your head against the wall.
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts
    Thank you folks!

    I did not realise that Word would 'remember' a deleted second page in a template. Very clever.

    Regards
    useful

  8. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Just to clarify, the continuation header/footer is contained in the section break/mark as would be a first-page header/footer and/or an odd-page header/footer. So, that is not deleted, it is still there at the end of the document. You can also create a continuation header/footer by creating a header/footer and then checking "Different first page." If you do this, the header/footer you created becomes the continuation header/footer (and disappears from the first page). Every section has three headers and three footers, whether or not they are shown.
    Last edited by Charles Kenyon; 2015-08-09 at 15:35.
    Charles Kyle Kenyon
    Madison, Wisconsin

  9. The Following User Says Thank You to Charles Kenyon For This Useful Post:

    useful (2015-08-09)

  10. #7
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts
    Thank you for the explanation Charles.

    Regards
    useful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •