
Tips.Net > WordTips Home > Macros > VBA Examples > Jumping to the Top of a Page
Summary: Do you want to easily jump to the top of a page in your document? You can use the Go To command to make the shift, or you can use the short macro described in this tip. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)
Word doesn't have a built-in command to jump to the top of the current (or next) page. Instead, Word expects you to use the Go To command to make those sort of jumps. (Just press F5, select Page, then click on Next or Previous.) If you need to jump to the top of the current page quite often, this approach can quickly become tedious. Sounds like a perfect opportunity to use a macro!
The following VBA macro jumps to the top of the current page:
Sub TopOfThisPage()
Selection.GoTo What:=wdGoToBookmark, Name:="\Page"
Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
If you want to go to the top of the next page, simply change the MoveLeft method to the MoveRight method. The macro relies on the use of the \Page bookmark, which is built-in to Word.
Once the macro is created, you can assign it to a keyboard shortcut, design a toolbar button to utilize it, or add it to the Quick Access toolbar.
Tip #742 applies to Microsoft Word versions: 97 2000 2002 2003 2007
Take Control! Master the real power behind Word! Successfully master the secrets of powerful formatting and create documents that stand out from the rest. Best of all, you can create documents that are easy to maintain and quick to change.
Check out Word 2007 Styles and Templates today!
Uncover how you can master the full potential of printing your documents. Everything you wanted to know about printing and printers, using Word. (more information...)
Ask a Word Question
Make a Comment
Bugs and Pests Tips
ExcelTips
Family Tips
Health Tips
Home Tips
Organizing Tips
WordTips