Hi Experts,
Is there a better way to test if a range contains a table of contents?
At the moment I determine the start and end paragraphs of the table of contents using:
intStartIndex = doctesting.Range(0, doctesting.Indexes(1).Rang
e.Start).P
aragraphs.
Count
intEndIndex = doctesting.Range(0, doctesting.Indexes(1).Rang
e.End).Par
agraphs.Co
unt
I store those values... then when I have my range I count the paragraphs up to that range:
rngParaCheck.SetRange Start:=doctesting.Content.
Start, End:=rng.Start
lngCurrentParagraph = rngParaCheck.Paragraphs.Co
unt
Every single line in the above is a bit of a drag on the system. Is there a better way to tell if a range is within a table of contents / table of figures, etc?
Thanks,
PatternNut
Start Free Trial