Figuring out how many lines are in a paragraph

D

Dan

Is there any way to programmatically determine how many lines are in a
paragraph? In addition, is there any way to determine what page(s) a
paragraph lies on, and how many lines of text (not including header and
footers) lie on a given page of a document?

Thanks...

Dan
 
D

Doug Robbins - Word MVP

Hi Dan,

See the Selection.Information property. You can use it with the .Range
object as well so set a range equal to the paragraph to get the first line
number, then set the .Start of the Range equal to the .End of the Range to
get the line number of the last line of the paragraph.

Do the same sort of thing with the .Range of the \page bookmark. In this
case though, the line number of the first line will always be 1 so it is
only necessary to determine the line number of the end of the .Range.

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
 

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