All the \* named format switches for Word field codes

Ever been confused by the \* formatting options in Word field codes?  You’re not alone, believe me.  Here’s a complete guide with the \* codes and examples of how they appear.

In this article we’ll look at the named formatting codes which start with \* like \* Arabic and \* Ordinal and even \* Hex .

Use these options with Word fields that return a number like SEQ, REF, PAGE, SECTION, SECTIONPAGES, AUTONUM, EDITTIME, FILESIZE and MERGEFIELD . The \* codes let you change how the number appears in the document in specific named ways.

Not what you’re looking for? There is also Word number \# field code formatting which gives you much more detailed formatting control.

One Number – 10 different formats

For example the number  5 from a Word field code could appear in the document in 10 different ways:
 5, e, E, v, V, 5th, five, fifth, five and 0/00 or 5. (the first is ‘Arabic’ 5 and the last is ‘Hex’ 5)

We’ll explain them all below in a list of the general number format switches with examples. Note, the bold in each example is purely for clarity purposes, just so it stands out for each example.

Named formatting switches

\* Arabic

\* Arabic – just the regular digits in order (1,2,3 …)  Copy format code to clipboard 📋

\* alphabetical

\* alphabetical – the regular lowercase letters.  1 = a , 2 = b etc. Copy format code to clipboard 📋


\* ALPHABETICAL –  regular uppercase letters. 1 = A , 2 = B etc. Copy format code to clipboard 📋

\* roman

\* roman – Roman numerals in lowercase.  Integers only up to 32,767. Fractions are rounded. Zero returns a blank. Negative numbers return an error. Copy format code to clipboard 📋


\*ROMAN –  roman numerals in uppercase. Integers only up to 32,767. Fractions are rounded. Zero returns a blank.  Negative numbers return an error. Copy format code to clipboard 📋

\* Ordinal

\* Ordinal – Ordinal numbers that define a position. 1st, 2nd, 3rd etc.  Fractions are rounded up/down. No thousands separators (pity). Copy format code to clipboard 📋

\* CardText

\* CardText –  results as cardinal text in lowercase letters (one , two, three …).  Any decimals are rounded to the nearest whole number.  Works up to 999,999.  Negative numbers are blank (not an error message). If you’re after dollars and cents in words, see \* DollarText below.  Copy format code to clipboard 📋

\* OrdText

\* OrdText – shows results as ordinal text in lowercase letters starting with zero (zeroth, first, second, third …) Note: it won’t work with negative numbers, as shown in Harry Potter’s example.  Works up to 999,999. Copy format code to clipboard 📋

\* DollarText

\* DollarText – displays the number in words plus any cents in the 00/100 format.  Word will insert ‘and’ at the decimal place. Cents are rounded to the first two decimals. Works up to one less than one million (999,999.99). Copy format code to clipboard 📋

Change the capitalization by adding text formatting codes like \* FirstCap etc.

For values one million and over, Greg Maxey and Doug Robbins have code that will handle up to 10 TRILLION

Over a million, please

DollarText and CardText were limited to 100,000 before being upscaled to just shy of a million. 

In our view, Microsoft should devote a little developer time to another upgrade for values/words into the Billions if not Trillions.  At least then Word would be compatible with the many billionaires, oligarchs and mere millionaires in the world 😊.

\* Hex

\* Hex– displays a number in hexadecimal form (hex, …) Copy format code to clipboard 📋 No negatives.

Bold, Italic, Color and other text formatting

Adding Bold, Italic, Highlighting is simple once you know the trick apply desired formatting to the format string as it appears with View Field Codes

It’s much the same to change colors for positive, negative or zero – change text color of the format string which is notably different to Excel.

All the \* named format switches for Word field codes

Using Text Boundaries view in Word – how and why
Show Crop Marks each page in Word
Add a link to a PDF or other file into a Word document

Join Office for Mere Mortals today

Office for Mere Mortals is where thousands pick up useful tips and tricks for Word, Excel, PowerPoint and Outlook.

Give it a try. You can unsubscribe at any time.  We've never spammed or sold addresses since we started over twenty years ago.
Invalid email address