Thread: [Solved] Advanced Index Query
View Single Post
 
Old 04-28-2021, 05:58 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Word Index Entry (XE) fields can support multiple sub-levels without resorting to 3rd-party addins. The format (e.g. bold, italic) in which each entry appears in the Index is controlled by the formatting applied to the relevant portion of the XE field. For example to refer to:
• Medical Journals, the XE field would be coded as { XE "Medical Journals" }
• USA Journals, the XE field would be coded as { XE "Medical Journals:USA Journals" }
• The Devil's Dictionary, the XE field would be coded as { XE "Medical Journals:USA Journals:The Devil's Dictionary" }
• Page 32, the XE field would be coded as { XE "Medical Journals:USA Journals:The Devil's Dictionary:Page 32" }
Similarly, to refer to:
• USA, the XE field would be coded as { XE "USA" }
• New York, the XE field would be coded as { XE "USA:New York" }
• Brooklyn, the XE field would be coded as { XE "USA:New York:Brooklyn" }
• Avenue J, the XE field would be coded as { XE "USA:New York:Brooklyn:Avenue J" }

When the Index is created, these would all be nested appropriately, with entries like:
Code:
Medical Journals			1
  USA Journals				1
    The Devil's Dictionary		1, 2
      Page 32				1, 2
USA					1
  New York				1
    Brooklyn				1, 2
      Avenue J				1
where the numbers on the right-hand side are the page numbers in your document where the Index Entry (XE) fields occur.

To automate the creation of the entries, you could use a concordance file - which will also define the format (e.g. bold, italic) in which the index entries will appear. A concordance file can be employed via References|Insert Index>Automark

The Index concordance document is essentially a two-column table in which the texts to be indexed are in the first column and the content and format of the Index entries are in the second column. Done properly, the process is effective, straightforward, and efficient.

However, for a cautionary note on what can happen if you're indiscriminate about what you index this way, see: How do I generate an index in Word? Using your example, you would need to be careful about how/whether you apply automatic index entries to pages and streets.

Once the entries are marked, see: Create and update an index - Word
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote