Microsoft Word: Character reference

By J. Carlton Collins, CPA

Q: Our company uses Word to generate timely web content, which then automatically flows to numerous internet forms for mass distribution. Most of the forms we link to limit the maximum number of characters. Is there an easy way to automate an operation to display word counts on the Word document—perhaps with a macro or VBA code?

A: (While this question is highly specific, my proposed solution regarding calculated fields in Word has numerous general applications that may benefit many readers.) You can display a document's character count in the header by inserting a calculating field into the Word header as follows: Double-click the header area to access the header, press Ctrl+F9 to insert a set of field braces, type = (the equal sign), press Ctrl+F9 again to insert another set of field braces, and then type numchars. At this point, your calculating field should appear as follows:

{={ numchars }}

With the cursor still positioned on the calculating field, press F9 to calculate (or update) the field; this action will display the total number of characters at the top of every page in the Word document.

To further improve on this solution, you could record this operation as a macro and create a macro button that automatically inserts this calculating field into any document's header as follows. From the View tab, select Macros, Record Macro, enter a name for the macro such as Insert_Character_Count as pictured below, and click OK.


From the Insert tab, select Header, Edit Header, press Ctrl+A to select all header content, press the Delete key to delete all header content, press Ctrl+F9 to insert a set of field braces, type = (the equal sign), press Ctrl+F9 again to insert another set of field braces, type numchars, press the F9 key, from the Insert tab, select Close Header and Footer, and then from the View tab, select Macros, Stop Recording. To make your new macro more accessible, add it to the Quick Access Toolbar by right-clicking the toolbar, select Customize Quick Access Toolbar, in the resulting Word Options dialog box, select Macros from the Choose commands from dropdown box, select the newly created macro (as pictured below), click the Add button to include this macro on the toolbar, click the Modify button and change the macro icon and title (in this example I've used the smiley face icon and labeled the macro Add Character Count to Document), and then click OK.



Thereafter, clicking the smiley face macro icon from the toolbar automatically inserts the character count in the document's header and will also update the character count, as pictured below.

You can download an example macro-enabled Word 2013 document that contains this macro at Notes: (1) Be sure to add text to this sample Word document so you can see the results update with a new character count; (2) your Quick Access Toolbar will not automatically display this macro button until you add the macro to the toolbar; or, if you prefer, you can run the macro from the View tab, by selecting Macros, View Macros, select the Insert_Char_Count macro and then click Run.



About the author

J. Carlton Collins ( is a technology consultant, a CPE instructor, and a JofA contributing editor. Note: Instructions for Microsoft Office in “Technology Q&A” refer to the 2013, 2010, and 2007 versions, unless otherwise specified.

Submit a question

Do you have technology questions for this column? Or, after reading an answer, do you have a better solution? Send them to We regret being unable to individually answer all submitted questions.

Where to find August’s flipbook issue

The Journal of Accountancy is now completely digital. 





Better decision-making with data analytics

Data analytics has become a hot topic, but many organizations have not yet managed to understand its potential, let alone put it to work. This report will take a deep-dive on how to best introduce or enhance the use of data in decision-making.