bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > VBA Examples > Jumping to the Top of a Page

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!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home

WordTips FAQ
WordTips Premium

Learn Access Now

Bugs and Pests Tips
ExcelTips
Family Tips
Health Tips
Home Tips
Organizing Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)