I am trying to edit my Table Of Contents (TOC). I have recored a Macro that
will find the TOC which is the only text in the document as Style hyperlink.
I have tried to search and hightlight all styles with hyperlink and than
change the tab. Could someone look at this code and inform me where I went
wrong.
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Hyperlink")
With Selection.Find
.Text = "*"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.ParagraphFormat.TabStops(InchesToPoints(3.47)).Position = _
InchesToPoints(5#)
Hi Michael,
You need to set the format of styles TOC 1 to TOC 9. these define the layout
of the Table of Contents

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
>I am trying to edit my Table Of Contents (TOC). I have recored a Macro
>that
[quoted text clipped - 22 lines]
> _
> InchesToPoints(5#)