A
Alex St-Pierre
Hi!
I would like to apply "TOC1" paragraph style to a table of content (item
"Heading Section;1"). I tried the following but doesn't work. Any idea?
Thank you!
Alex
docWord.Paragraphs(iTOC).Styles = "TOC1"
docWord.TablesOfContents.Add Range:=docWord.Paragraphs(iTOC).Range,
RightAlignPageNumbers:= _
True, UseHeadingStyles:=False, IncludePageNumbers:=True,
AddedStyles _
:="Heading Section;1", UseHyperlinks:=True, HidePageNumbersInWeb _
:=True, UseOutlineLevels:=False
docWord.TablesOfContents(1).TabLeader = wdTabLeaderDots
docWord.TablesOfContents.Format = wdIndexIndent
I would like to apply "TOC1" paragraph style to a table of content (item
"Heading Section;1"). I tried the following but doesn't work. Any idea?
Thank you!
Alex
docWord.Paragraphs(iTOC).Styles = "TOC1"
docWord.TablesOfContents.Add Range:=docWord.Paragraphs(iTOC).Range,
RightAlignPageNumbers:= _
True, UseHeadingStyles:=False, IncludePageNumbers:=True,
AddedStyles _
:="Heading Section;1", UseHyperlinks:=True, HidePageNumbersInWeb _
:=True, UseOutlineLevels:=False
docWord.TablesOfContents(1).TabLeader = wdTabLeaderDots
docWord.TablesOfContents.Format = wdIndexIndent