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

Tips.Net > WordTips Home > Editing > Selecting Text > Selecting Sentences with WordBasic

Selecting Sentences with WordBasic

Summary: A WordBasic macro that allows you to step through a document, sentence by sentence. (This tip works with Microsoft Word 6, and Word 95.)

Word does not provide function keys for you to step through your document one sentence at a time. If you are used to a different word processor, you may consider such a capability rather important. The following WordBasic macro, StepRightSentence, provides the capability to step through a document one sentence at a time toward the right. You can assign the macro either to a shortcut key or to a toolbar button.

Sub MAIN
   InSelection = SelType()
   If InSelection = 2 Or InSelection = 6 Then CharRight 1
   SentRight 1, 1
End Sub

If you want to use Word 6 or Word 95 to step through a document toward the left (beginning of the document), you can use the following macro, StepLeftSentence:

Sub MAIN
   InSelection = SelType()
   If InSelection = 2 Or InSelection = 6 Then CharLeft 1
   SentLeft 1, 1
End Sub

Remember that you can assign these macros to function keys in your version of Word. They are quite helpful as you are editing your document.

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


Ultimate Library! An amazing resource that brings together, in one place, the collected knowledge of everything ever published in WordTips. The library combines two powerful elements to make you more productive: solutions and convenience. Here's where you get your own copy of everything ever published in WordTips.
 
Check out WordTips Ten-Year Library 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.)