C
CJ
Word 2003 XP. Table of Contents is inserted programatically, based on
heading styles only. All TOC styles are based on no style, and unbolded
text. Heading styles 1-4 are outline number styles, bold text. When I run
the table of contents, all but one heading style appears correctly - the text
is unbolded but the heading number is bolded. Can't figure out how to
correct it. I'm not sure what you might need to see, so I'm going to wait
until I hear back from someone. I've even used the organizer to get the
style from another .dot, but problem continues. I've created a whole new
template, and the problem continues. The TOC code follows:
Sub MakeTOC()
'
' MakeTOC Macro
' Macro recorded 1/16/2008 by Admin
'
With ActiveDocument
.TablesOfContents.Add Range:=Selection.Range,
RightAlignPageNumbers:= _
True, UseHeadingStyles:=True, UpperHeadingLevel:=1, _
LowerHeadingLevel:=6, IncludePageNumbers:=True,
AddedStyles:="SubA,3, Sub1,3", _
UseHyperlinks:=False, HidePageNumbersInWeb:=True,
UseOutlineLevels:= _
False
.TablesOfContents(1).TabLeader = wdTabLeaderDots
.TablesOfContents.Format = wdIndexIndent
End With
ActiveDocument.TablesOfContents(1).Update
End Sub
heading styles only. All TOC styles are based on no style, and unbolded
text. Heading styles 1-4 are outline number styles, bold text. When I run
the table of contents, all but one heading style appears correctly - the text
is unbolded but the heading number is bolded. Can't figure out how to
correct it. I'm not sure what you might need to see, so I'm going to wait
until I hear back from someone. I've even used the organizer to get the
style from another .dot, but problem continues. I've created a whole new
template, and the problem continues. The TOC code follows:
Sub MakeTOC()
'
' MakeTOC Macro
' Macro recorded 1/16/2008 by Admin
'
With ActiveDocument
.TablesOfContents.Add Range:=Selection.Range,
RightAlignPageNumbers:= _
True, UseHeadingStyles:=True, UpperHeadingLevel:=1, _
LowerHeadingLevel:=6, IncludePageNumbers:=True,
AddedStyles:="SubA,3, Sub1,3", _
UseHyperlinks:=False, HidePageNumbersInWeb:=True,
UseOutlineLevels:= _
False
.TablesOfContents(1).TabLeader = wdTabLeaderDots
.TablesOfContents.Format = wdIndexIndent
End With
ActiveDocument.TablesOfContents(1).Update
End Sub