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

Tips.Net > WordTips Home > Macros > WordBasic Examples > Jumping to the Start or End of a Document with WordBasic

Jumping to the Start or End of a Document with WordBasic

Summary: Need to jump to either extreme of your document within a WordBasic macro? Here's how. (This tip works with Microsoft Word 6, and Word 95.)

When you are creating a WordBasic macro, there are many times you want to move to the beginning or end of your document. WordBasic provides two commands to jump to the two extremes of your document file. The first, StartOfDocument, jumps to the beginning of a document. The other, EndOfDocument, jumps to the end. Optionally, you can include a non-zero value (1 is always good) after the command to indicate that all the text between the insertion point and the start or end of the document should be selected. For instance, the following command line instructs Word to select all the text between the insertion point and the end of the document:

EndOfDocument 1

Tip #119 applies to Microsoft Word versions: 6 | 95


More Power! For some people, the prospect of creating Word macros can be scary. WordTips: The Macros can help you conquer your fears and you'll discover you're much more confident and productive as you make Word do exactly what you want. This is an invaluable source for learning macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of WordTips. Learn at your own pace, exactly the way you want.
 
Check out WordTips: The Macros today!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Tips.Net Store

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 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.)