• Word 2010 macro for page numbering

    Author
    Topic
    #501414

    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 :confused:

    Viewing 5 reply threads
    Author
    Replies
    • #1520391

      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
      [Fmr MS MVP - Word]

    • #1520395

      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.

    • #1520397

      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.

    • #1520689

      Thank you folks!

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

      Regards
      useful 🙂

    • #1521271

      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.

    • #1521362

      Thank you for the explanation Charles.

      Regards
      useful 🙂

    Viewing 5 reply threads
    Reply To: Word 2010 macro for page numbering

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: