Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word - line number, how to detect it? 1

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,565
US
In Word, status bar at the bottom shows: Page #, Sec. #, 1/1, (location) At 1.3” and Ln 35 (Line number the cursor is on)

How can I retrieve the value of Ln in VBA to get 35, for example?

And how can I get all other info from Status Bar mentioned above?


Have fun.

---- Andy
 
How can I retrieve the value of Ln
Selection.Information(wdFirstCharacterLineNumber)

how can I get all other info from Status Bar
Press the F1 key when the cursor is inside the word Information in the above code.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Works great - thank you


Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top