I'm trying to format a numeric merge field in Microsoft Word 365. I normally use a numeric picture switch like this:
\# 000000000000000000
This is what the full field code looks like:
{ REF bookmark \# 000000000000000000 \* MERGEFORMAT }
That's 18 total zeroes. I need to be able to have up to 18 digits showing with leading zeroes. If the referenced bookmark has 3 digits, I need 15 leading zeroes. If the bookmark has 15 digits, I need 3 leading zeroes. The length can be varied but always numbers. (There are no commas or dollar signs in the field.)
When I use the switch mentioned above, the number is rounded off after 14 digits. If my number is 1234567890123456, the number that appears is 001234567890123500. If I don't include the numeric picture switch and just use the ref field, the numbers aren't rounded off but also the leading zeroes don't appear. If possible, I need the switch to remain so I can keep those leading zeroes.
Any help will be greatly appreciated!!