Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-09-2020, 05:20 PM
Guessed's Avatar
Guessed Guessed is offline TOC how do I make page numbers one single font? Windows 10 TOC how do I make page numbers one single font? 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

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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC how do I make page numbers one single font? change font for all page numbers lemonphenomenon Word 17 12-19-2020 03:20 PM
TOC how do I make page numbers one single font? make single letter top to bottom of page-Large famreeks Word 3 04-27-2017 05:40 PM
Make a certain font face and font color as default in a document. Singh_Edm Word VBA 2 09-13-2014 08:47 PM
How do I make the page numbers appear on the left in TOC? Faizah Noor Word 0 07-08-2013 12:59 AM
TOC how do I make page numbers one single font? Make Font Dropdown Change All Styles' Font trevorhiller Word 1 04-14-2012 02:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:39 PM.


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