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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Number in Word Using VBA 1

Status
Not open for further replies.

brian0167

Programmer
May 1, 2001
3
US
Hi,
Does anyone know of a way to determine the line number/page number of the cursor in a Word document.

REASON:
I am trying to create a template which will be used for document review. I have create a push button and a text box in the template. The document to be reviewed is inserted into a document based on this template. I then want to be able to have users read through a document and whenever they want to add a comment hit the push button. This will activate the text box where they type in their comment. The comment and user name then get inserted into a separate document. (This all works so far) But I can't determine the line number that corresponds to where they are making the comment. HELP??

thanks
brian
 
brian0167,

My concern is the same as Dreamboat's above, why not use Tracked Changes? My reason for saying this is that things will change when you edit the document by inserting or deleting any information. Also, this option will allow you to track who made what changes at a glance.

However, I will offer the following if it will help. Go to File, Page Setup, Layout tab and click on the Line numbers button, then check the Add Line numbering option and click on OK.

Hope this helps.
 
You might be able to use

Selection.Information(wdFirstCharacterLineNumber)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top