How do I determine the line number of a range in MS Word/VBA

S

still_looking

Hi,

At any given time Word knows what line number I an currently in. How can I
find the (starting) line number of a range or selection in Word VBA?

thanks
still_looking
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?c3RpbGxfbG9va2luZw==?=,
At any given time Word knows what line number I an currently in. How can I
find the (starting) line number of a range or selection in Word VBA?
You need to use the Information property of the Selection or Range object.
Example:
?Selection.Information(wdFirstCharacterLineNumber)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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