A
Associates
Hi,
I am having problem with TOC in word document (office 03). I was wondering
if anyone might be able to help me out.
The following is what i have in TOC
Preface..................................1
Introduction............................2
Chapter 1 xxxxx......................3
....
Bibliography 4
Abbreviation 5
The way i added those two sections (Bibliography and Abbreviation) is
through the use of the following code
Selection.TypeText myStr
Selection.Style = ActiveDocument.Styles("Doument Heading 1")
Call UpdateTOC
In the UpdateTOC sub, i have
Sub UpdateTOC()
Application.ScreenUpdating = False
Dim toc As TableOfContents
For Each toc In ActiveDocument.TablesOfContents
toc.Update
Next
End Sub
In the document itself, i have "Doument Heading 1" style set up. However,
don't know if i have set the style up incorrectly. Would i be able to get
some help here?
Thank you in advance
I am having problem with TOC in word document (office 03). I was wondering
if anyone might be able to help me out.
The following is what i have in TOC
Preface..................................1
Introduction............................2
Chapter 1 xxxxx......................3
....
Bibliography 4
Abbreviation 5
The way i added those two sections (Bibliography and Abbreviation) is
through the use of the following code
Selection.TypeText myStr
Selection.Style = ActiveDocument.Styles("Doument Heading 1")
Call UpdateTOC
In the UpdateTOC sub, i have
Sub UpdateTOC()
Application.ScreenUpdating = False
Dim toc As TableOfContents
For Each toc In ActiveDocument.TablesOfContents
toc.Update
Next
End Sub
In the document itself, i have "Doument Heading 1" style set up. However,
don't know if i have set the style up incorrectly. Would i be able to get
some help here?
Thank you in advance