Line Numbering (Cannot GoTo!?)

J

Jeffrey A. Voigt

I'm trying to programmatically go to a specific line (without running
through the entire document a line at a time). I know you can use the Goto
command to a specific line, but it's not doing what I want it to do.
Example, if you setup word to display the line number next to each line
there are problems when you have tables and other objects throughout the
document. The tables are not numbered with a line number (which is fine).
So what you might end up with is something like the following:

1 Text fkjsa fjksajkfs
2 Text kjfsajkfdkjsadf
<Table> Row 1
<End Table> Row 2
3 Text jfkdsafjksafjks
4 Text fkjdsfjks

Now I want to be able to tell Word to goto Line # 4. Line # 4 which is
(Text fk..), but rather Word goes to the line starting with <End Table>....

Is it possible to have to have Word quickly navigate to the line # 4 without
having to find it line by line?

Thanks
- J
 
W

Word Heretic

G'day "Jeffrey A. Voigt" <[email protected]>,

Tip1: Goto works with the selection only

Tip2: What is the characteristic of your target line? That's what we
need to tell you how to find it :)

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Jeffrey A. Voigt reckoned:
 
J

Jeffrey A. Voigt

OK. Basically we have an app where we are adding a new word button to do
the following.

User Enters in Starting Line # and Ending Line #. The app must highlight
the lines request. I.E: User Inputs 9 & 20. The app must highlight lines 9
through 20. However, the lines that should be highlights are the the lines
with 9 (on the left side) through 20 (on the left side). This does not work
since tables and a few other objects are now line numbered and the selection
object (I thought) will go to the direct line (with no relation to the line
numbers printed, rather only the number of lines to move down from the
beginning of the page).

Please let me know if there is something I'm overlooking!

Thanks,
- JV
 
W

Word Heretic

G'day "Jeffrey A. Voigt" <[email protected]>,

If each line is its own paragraph, you could count down each para,
test the Selection.Information for being in a table and if so ignore
it.

If it is truly line based, and not para based, it gets a lot trickier.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Jeffrey A. Voigt reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top