Table of Contents Styles font issue

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
 
A

Agatha

you have to create a manual table of contents ... go to the references
tab...click on manual table of contents...a window will open and then click
Modify...click on the heading/TOC level and then click modify.

good luck, Aggie
 
C

CJ

Thanks for responding Aggie. It turned out the issue was bold formatting
applied to the heading number....All is well and my automated TOC now behaves
properly. You know, I wrestled with this for 4 days and never saw it until
late yesterday afternoon. Busy today until now to be able to check
messages....Thanks again.
 
P

Phreeq

Maybe one of you can help me with a TOC problem I'm having.

I'm using ActiveDocument.TablesOfContents(1).Update for updating my TOC, but
when I run that, it changes the font from Arial to Times New Roman. The
client I'm building these documents for is insisting on Arial for the entire
document, so I can't have this changing.

Thanks!
 
C

CJ

TOC styles are based on normal font, so if you have not changed the normal
style for the document, you can go into your Format/Styles pane and modify
the normal style to Arial, and choose your size, of course. Do not add it to
your template unless you want all documents you do to be Arial. Save the
document first, and then update your TOC. If it still does not, you can go
back into the Format/Styles pane and modify each level of TOC style that
you're inserting into your TOC. Save the document first, then update your
table. Let me know if this has helped you.
 
P

Phreeq

Actually, I was coming back to let y'all know that I found the problem when I
got the email that you responded.

I had something wrong with my custom TOC style that I was using. Once I
fixed that, everything worked like it should.

Thanks for the quick response!
 

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

Similar Threads

Table of Contents Nightmare 1
Table of Content 1
TOC problem 0
TOC Help 0
TOC Problem 0
TOC Question 3
Apply a paragraph style to a Table of Contents 1
TOC is picking up extra styles 6

Top