Format Table of Contents

M

mmikedm1000

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#)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top