Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Selecting Sentences.

Selecting Sentences

by Allen Wyatt
(last updated March 23, 2015)

2

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 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 StepRightSentence()
    If Selection.Type <> wdNoSelection Then
        Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdMove
    End If
    Selection.Sentences(1).Next(Unit:=wdSentence, Count:=1).Select
End Sub

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

Sub StepLeftSentence()
    If Selection.Type <> wdNoSelection Then
        Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdMove
    End If
    Selection.Sentences(1).Previous(Unit:=wdSentence, Count:=1).Select
End Sub

Regardless of which of these macros you use, the result is that you step through your document, one sentence at a time. After running the macro, the next sentence—left or right—is selected. If you instead want to only jump to the beginning of the sentence, without selecting it, add the following line as the final line in the macro, just before the End Sub statement:

    Selection.Collapse Direction:=wdCollapseStart

If you prefer to not use macros, you can also move through sentences by customizing Word to take advantage of some "hidden" commands. Follow these steps:

  1. Choose the Customize option from the Tools menu. Word displays the Customize dialog box. (See Figure 1.)
  2. Figure 1. The Customize dialog box.

  3. Click on the Keyboard button. Word displays the Customize Keyboard dialog box. (See Figure 2.)
  4. Figure 2. The Customize Keyboard dialog box.

  5. In the Categories list, choose All Commands.
  6. In the Commands list, choose SentLeft.
  7. Click in the Press New Shortcut Key box.
  8. Press Alt+Left Arrow.
  9. Click on Assign.
  10. Click on Close to dismiss the Customize Keyboard dialog box.
  11. Click on Close to close the Customize dialog box.

After performing this series of steps, you can step backwards through your document, one sentence at a time, simply by pressing Alt+Left Arrow. You can also repeat the steps and assign the following

Action Commands List Shortcut Key
Step right by sentences SentRight Alt+Right Arrow
Step left and select SentLeftExtend Shift+Alt+Left Arrow
Step right and select SentRightExtend Shift+Alt+Right Arrow

Most Word users will find these keyboard commands a welcome addition to the normal editing keys. You should know, however, that some of these suggested shortcut keys are already in use by Word. For instance, the Shift+Alt+Left Arrow combination is used to promote a heading level in an outline. However, if you can live without that use of the keys, then go for it. (Personally, I think this reassigned use makes much more sense.) If you would rather use a different key combination, you can do so by using any one you would like in step 6 above.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (979) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Selecting Sentences.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Selective Undo

Ever wonder why you can't undo just a single edit you made a few minutes earlier? The short answer is that it could make your ...

Discover More

Using Seek In a Macro

When reading information from a text file, your macro may need to start reading at a place other than the beginning of the ...

Discover More

Defeating Automatic Date Parsing

Excel is continually trying to figure out what type of data is being stored in a cell. If it can interpret a value as a date, ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

MORE WORDTIPS (MENU)

Selecting an Entire Section

Documents can be subdivided into sections, with each of them formatted differently. If you want to select all the text in a ...

Discover More

Selecting a Group of Words

Want to select a chunk of text in a document? Perhaps the easiest way to do this involves using the mouse in conjunction with ...

Discover More

Quickly Selecting Text

Want a really quick way to select text? Just combine the Shift key with a simple mouse click.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments for this tip:

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 9 + 8?

2015-05-12 13:48:53

Marc Hichens

When no text is selected, the enumerated result is 1, which is wdSelectionIP, not wdNoSelection (=0). [obtained by "print Selection.Type" in the Immediate Window]

I have found references for wdSelectionIP that define the term as selecting an Inline Paragraph as well as the selection is the Insertion Point.

When selecting an inline paragraph, the result is 2, which is wdSelectNormal, which is also the same for selection 1 character.

My examples were based upon the cursor being in the body, not the header, foorter, footnote, endnote, figure, table, or shape.

Your examples check for the Selection.Type = wdNoSelection

How does one achieve a selection type of wdNoSelection when the result for nothing selected = wdSelectionIP?


2012-08-05 03:15:15

Stef

Thanks - I'd forgotten how to access this feature in word. Excellent to have it back!!


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.

Links and Sharing
Share