vba: Word numerals to have six numerals

SteveD 625 Reputation points
2026-04-19T20:58:10.9533333+00:00

Hello from Steve

Word numerals to have six numerals

Objective find numeral when found must have six numerals

If less than six numerals put in zeros at the beginning to complete six numerals

Microsoft 365 and Office | Word | For home | Windows

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

1 answer

Sort by: Oldest
  1. AI answer

    2026-04-19T20:58:18.9+00:00

    Use a numeric picture format in a field so that numbers are always shown with six digits by padding with leading zeros.

    1. Press Ctrl+F9 to insert field braces { } (do not type them).
    2. Inside the braces, type a formula field with a numeric picture, for example: { = 123 \# "000000" } When updated, this displays 000123.
    3. To use a value from elsewhere (for example, a bookmark named MyNumber): { = MyNumber \# "000000" }
    4. Select the field and press F9 to update.

    Explanation of the picture format:

    • \# "000000" tells Word to format the result as six digits.
    • If the number has fewer than six digits, Word adds leading zeros.

    This works with any numeric result produced by a field (calculations, SEQ fields, bookmarked numbers, etc.).


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.