Is there a way to put page numbers before the TOC text?

  • Thread starter Thread starter RitaF
  • Start date Start date
R

RitaF

I am working with Word 2003 and would like the page numbers to appear
before their pertinent TOC item.

Thanks for your help.
 
There is practical way to do this with a TOC generated by a TOC field.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
I see how to put the page number after the TOC entry, but I would like
it to proceed the TOC entry: i.e.
1 Executive Summary

Also, is there a way to modify the font for the page number versus the
TOC entry (i.e. page number font is blue but TOC entry is black)?
Thanks.
 
There is no practical way to do either of the things you ask in an
automatically generated TOC.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
For a printed document, enter the magic of vba.
Having completed the editing of the document.
Create the TOC normally.
Select the TOC.
Run the following macro, which will convert the TOC field to text and format
it with the numbers leading and coloured blue.
If there are late changes to be made to the document that require the TOC to
be updated, then delete the modified TOC, re-insert an automatic TOC and
re-run the macro to re-format it.
It should work for a simple TOC such as that described. More complex TOCs
will probably require extra macro code.


Sub FormatTOC()
Dim oRng As Range
Dim oPara As Range
Dim i As Long
Dim vTOC As Variant
Set oRng = Selection.Range

oRng.Fields.Unlink
For i = 1 To oRng.Paragraphs.Count
Set oPara = oRng.Paragraphs(i).Range
oPara.End = oPara.End - 1
vTOC = Split(oPara, Chr(9))
oPara.Text = vTOC(1) & vbTab & vTOC(0)
oPara.ParagraphFormat.Alignment = wdAlignParagraphLeft
oPara.ParagraphFormat.TabStops.ClearAll
oPara.ParagraphFormat.TabStops.Add _
Position:=InchesToPoints(0.5), _
Alignment:=wdAlignTabLeft, _
Leader:=wdTabLeaderSpaces
oPara.Words(1).Font.Color = wdColorBlue
Next i
End Sub

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top