N
Nick Transier
I am working through a word document and parsing information out. I have
lots of type/format handling in the form of if-then-else loops. However,
when selecting the paragraph immediately after the table of contents, the
para.range.select function selects both that paragraph and then entire TOC.
Any idea why this happens? I have setup watch variables and the para object
is of type "Normal" and not "TOC", but for some reason on screen it is
selected with the TOC as well. I am baffled. I have tried putting hard
returns and such in to get around the problem, but I have had no luck.
My Loop Looks like this:
For each para in ActiveDocument.Paragraphs
'Do stuff
Next Para
My Document Looks like this
(TOC)
1. Section 1 ..... 1 (paragraph mark)
1.1 SubSection 1 ....... 1 (paragraph mark)
(paragraph mark) <----- This para object causing the problem
Section 1 (paragraph mark)
Text Under Section 1 (paragraph mark)
(paragraph mark)
Section 1.1 (paragraph mark)
Text Under Section 1.1 (paragraph mark)
(etc)
lots of type/format handling in the form of if-then-else loops. However,
when selecting the paragraph immediately after the table of contents, the
para.range.select function selects both that paragraph and then entire TOC.
Any idea why this happens? I have setup watch variables and the para object
is of type "Normal" and not "TOC", but for some reason on screen it is
selected with the TOC as well. I am baffled. I have tried putting hard
returns and such in to get around the problem, but I have had no luck.
My Loop Looks like this:
For each para in ActiveDocument.Paragraphs
'Do stuff
Next Para
My Document Looks like this
(TOC)
1. Section 1 ..... 1 (paragraph mark)
1.1 SubSection 1 ....... 1 (paragraph mark)
(paragraph mark) <----- This para object causing the problem
Section 1 (paragraph mark)
Text Under Section 1 (paragraph mark)
(paragraph mark)
Section 1.1 (paragraph mark)
Text Under Section 1.1 (paragraph mark)
(etc)