You are here:

Microsoft Word/Autotext heading numbers


Hi. I know how to create an Autotext entry that places the Heading 1 style text in a document header (the field code entry is { STYLEREF "Heading 1" * MERGEFORMAT}), but that code does not pull in the heading number for that section. For example, if my section has Heading 1 style text " 1 Introduction", the Autotext entry { STYLEREF "Heading 1" * MERGEFORMAT} will only put in the text "Introduction", and not the heading number "1". Is there some way to do this?



Unfortunately, it requires two StyleRef fields to accomplish this, one for the paragraph text and one for the paragraph number. The article at describes the switches that can be used to insert the paragraph number in various formats; you may have to experiment to get the result you want. If you use the Field dialog (accessed via Insert | Field in Word 2003 and earlier, Insert | Text | Quick Parts | Field in Word 2007 and above) and select StyleRef, you'll see the options: Paragraph number, Paragraph number in relative context, and Paragraph number in full context. Probably the first (which is the \n switch) will do what you want.
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


Suzanne S. Barnhill


I've been using Word for Windows since version 2.0 (1992), and the more I learn about it, the more I realize how little I know. But I may know a few things that you don't, and I'll help if I can. I answer many questions every day in Microsoft's peer support forums and as a result have been awarded the MVP (Most Valuable Professional) designation by Microsoft Corporation. You may be able to find the answer to your question at the Word MVPs' FAQ site or at my own Word FAQ site, so please check those first! Please, no questions about VBA (macros), Registry editing, networks, or complex merges, as I have no experience with these aspects of Word, nor do I have any experience with Word for Mac. Please indicate which version of Word you are using; if you are not sure, see "What version of Word do I have?".


I have a master's degree in classics (Latin), which is surprisingly helpful, though I no longer teach. The things I am proudest of: Having raised two children to maturity, both Merit Scholars, both college graduates (one a philosophy major!), one Phi Beta Kappa (from Harvard!); having been made a Paul Harris Fellow by my Rotary club; having been designated a Microsoft MVP.

Rotary Club of Fairhope, Friends of the Fairhope Public Library

B.A. (Latin), Agnes Scott College, 1966; M.A. (Classics), Emory University, 1972.

Awards and Honors
Microsoft Most Valuable Professional award every year since 1999; many Rotary honors

©2017 All rights reserved.