Thank you for the detailed help Eric.
I copied and pasted your code directly and for some reason, an underlined word above the two sections is getting selected and saved to the variable and only one underlined word between section 1 and section 2 is getting selected.
For example my document looks like this:Overview
some textsome textsome textSection 1Example 1: some textExample 2: some textExample 3: some textSection 2Some text
For some reason, "overview" is getting selected. And then only "Example1" gets selected but not "Example3". It's pretty strange.
However, if I delete the "overview" text from the document, then only "Example1" and "Example3" get selected, which is what I want since those are the two underlined items between section 1 and section 2. I verified my start and end text variables are set to Section 1 and Section 2 as well.
Not too sure what's going on... Thanks again for your help.