#1
|
|||
|
|||
TOC how do I make page numbers one single font?
In my TOC, each level is a different font. Some are plain, others italic. The page numbers match the levels. I'd rather have one single font/style for the numbers. Is there a way to change the formatting of just the page numbers but not the titles? |
#2
|
||||
|
||||
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
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thank you!
Quote:
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
change font for all page numbers | lemonphenomenon | Word | 17 | 12-19-2020 03:20 PM |
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 |
Make Font Dropdown Change All Styles' Font | trevorhiller | Word | 1 | 04-14-2012 02:14 AM |