Listing Macros to Navigate from One Sentence to Another

Sub GoToNextSentence()

Selection.Move wdSentence, 1 End Sub

Sub GoToPreviousSentence()

Selection.Move wdSentence, -1 End Sub

For maximum convenience,assign shortcut keys to the macros in Listing 7.6. Choose Office,Word Options,click Customize,and then click the Customize button. In the Categories list,click Macros, click the procedure name in the Macros list,and then click inside the Press New Shortcut Key box. Press the shortcut key (for example, Ctrl+Alt+Shift+left arrow for GoToNextSentence and Ctrl+Alt+Shift+right arrow for GoToPreviousSentence),and then click Assign.

0 0

Post a comment