MattM
MattM

Reputation: 21

MS Word page numbers with a specific format

I need to add page numbers to a document that have 5 digits all the time (i.e. 00001, 00002,... 00153)

MS Word does not natively allow for such a specific numbering convention. Is there a way to do this with VBA?

Upvotes: 1

Views: 75

Answers (2)

Cindy Meister
Cindy Meister

Reputation: 25663

The field code can actually be generated fairly simply by using a numeric formatting switch:

{ PAGE \# "00000" }

Upvotes: 0

Timothy Rylatt
Timothy Rylatt

Reputation: 7850

VBA isn't necessary to achieve this. Just use nested IF fields.

enter image description here

Upvotes: 1

Related Questions