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:
- Word VBA Using Bookmarks to Move the Cursor
- Word VBA, Move Cursor to Start of Document
- Word VBA, Move Cursor to End of Document
- Word VBA, Move Cursor to End of Line
- Word VBA, Move Cursor to Start of Line
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