View Single Post
 
Old 04-27-2015, 06:22 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

You could create a style say called "SpecTOC" and apply it to you separator phrases. Then run:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
  Set oRng = ActiveDocument.Range
  oRng.Collapse
  
  With ActiveDocument
    .TablesOfContents.Add Range:=oRng, RightAlignPageNumbers:= _
      True, UseHeadingStyles:=False, IncludePageNumbers:=True, AddedStyles _
      :="SpecTOC,1", UseHyperlinks:=True, HidePageNumbersInWeb:=True, _
      UseOutlineLevels:=False
    .TablesOfContents(1).TabLeader = wdTabLeaderDots
    .TablesOfContents.Format = wdIndexIndent
  End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote