View Single Post
 
Old 11-09-2020, 05:20 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,163
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

There isn't a fancy field code trick to do this but it could be done by applying local font formatting AFTER you refresh the TOC. This would need to be done every time the TOC is updated.

You could either apply this formatting manually or create a macro to do it. A macro that makes all page numbers the same as the first one could look like this.
Code:
Sub TOC_PageNums()
  Dim aPara As Paragraph, aRng As Range, aTOC As TableOfContents
  Set aTOC = ActiveDocument.TablesOfContents(1)
  aTOC.Update
  For Each aPara In aTOC.Range.Paragraphs
    aPara.Range.Words.Last.Previous.Font = aTOC.Range.Paragraphs(1).Range.Words.Last.Font
  Next aPara
End Sub
Does that work on your Mac?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote