You are here:

Microsoft Word/Adding specifics to Hierarchy Macro


David wrote at 2013-07-30 21:04:39
Sorry, but I do not remember how to follow up on the website. The first macro you provided does nothing. The second macro caused the same problem I was having.

As the macro states, let's say that in the document, no "." gets Heading 1, one "." gets Heading 2, two "." gets Heading 3, and so on. The document contains the following levels (pretend that "!##!" is before each hierarchy number, and that originally all the names are currently in Heading 1):

1 B21. Book

1.1 Book Name

1.1.1 B3. Book Reference

2 Address

2.1 A42. Address State

2.1.1 A23.2.1 Address Code

The macro should ONLY count the first numbers (which are part of the hierarchy). Anything after the space should not be counted. So, "1.1.1 B3. Book Reference" should only be counted to having 2 "."s, not seven.

About Microsoft Word
This topic answers questions related to Microsoft Word stand-alone or Microsoft Office Word including Word 2003, Word 2007, Office 2000, and Office XP. You can get Word help on formatting text, tables, tabs, fonts, styles, general Word layouts, bullets, headings, and outlines, using templates, toolbar modifications, and using Track Changes. You may also find tips on linking Word and Excel embedded objects including charts. This site does not provide a general Word tutorial nor the basics of using a word processor. It provides specific answers to using Microsoft Word only. If you do not see your Word question answered in this area then please ask a Word question here

Microsoft Word

All Answers

Answers by Expert:

Ask Experts


Aidan Heritage


I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions of Word from 2 onwards. As AllExperts closes down, just google me to find my details - I will still be around answering questions!


have worked with Word for more years than I care to remember!

Educated to UK A level standard, but the university of life has been more relevant!

©2017 All rights reserved.

[an error occurred while processing this directive]