Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2021, 04:06 AM
Guessed's Avatar
Guessed Guessed is offline The last page number of a heading in TOC Windows 10 The last page number of a heading in TOC Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Ahh, if that is what the poster meant then it is certainly more complicated than I would ever bother working with...

But I think it can still be done with nested ref codes in TC field. Say you bookmark the heading text with the bookmark name 'head1'. Then add a TC field where you want that section's pages to end (ie. in the last paragraph of that section)


{TC "{Ref head1 \n} {Ref head1} {PageRef head1}-{Page}" \l 1 \n}

Then build the TOC using the \f switch to bring in the TC fields.

This works as a concept and could be coded into a macro but it is so ungainly that it is easier to just build the actual tc text on the fly with a macro and forget trying to use the nested fields.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of contents puts page number next to heading redyar Word 2 06-18-2020 09:33 AM
Can I create a page number from a non-Heading style? techwriter3k Word 9 09-25-2019 06:58 AM
Page number with chapter number but not from Heading 1 alpruett Word 5 06-04-2014 02:00 PM
Control the size of space between heading number and heading text Dr Wu Word 1 07-17-2013 12:24 PM
Page number picking up heading numbering?! Ulodesk Word 0 09-24-2009 01:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft