Word VBA, Go to Specific Line

There are several different methods for going to a specific line in word using VBA. One method is using bookmarks which I’ve covered in the article below:

Another method would be going to a specific line number. Using the code below you can take the cursor to line 29:

Selection.GoTo What:=wdGoToLine, Which:=wdGoToFirst, Count:=29

Note: Unlike what was explained in the articles Word VBA, End of File and Word VBA, Get Current Line Number , in this case the line number is relative to the start of the document not the page.

See also:

If you need assistance with your code, or you are looking for a VBA programmer to hire feel free to contact me. Also please visit my website  www.software-solutions-online.com

Leave a Reply

Your email address will not be published. Required fields are marked *