ExtendSelection (F8) -- Nice undocumented twist

  • Thread starter Thread starter Klaus Linke
  • Start date Start date
K

Klaus Linke

By accident, I just found a nice "easter egg" which does not seem to be
described in the Help:
If you use F8, and then type some character, Word will extend the selection
up to (and including) the next occurrence of that character.
Does not seem to matter how far away that character is (... it selects more
than 64 kB, or hundreds of paragraphs, if necessary).

Who knew?

:-) Klaus
 
There are a lot of things that have been around for a long time that are
not now covered in the Help files.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
I recall reading that somewhere long ago (perhaps in Help, perhaps in some
"tips" column), but since I don't use F8, I'd never used it. It is
definitely not in Word 2003 Help (at least not in the "Keyboard shortcuts"
topic).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Doug Robbins - Word MVP said:
There are a lot of things that have been around for a long time that are
not now covered in the Help files.


Too true... Maybe the developers don't talk with the documentation guys?
Or maybe the developers are afraid once stuff makes it into the Help files,
they have to support it in the future?

Anyway, that F8-trick is really great, I think.
Say with the cursor at the start of the following text:
This is an example text: It demonstrates F8 (ExtendSelection).

Hit F8, then type the ":", and "This is an example text:" is selected.
Type "8", and everything up to and including "F8" is selected...
(The Esc key stops ExtendMode, or double-click on "EXT" in the status bar to
turn it on/off).

I adapted my macro to toggle the active end of a selection, so it works with
ExtendMode (see below).
So after you toggle the active end by calling my macro with its keyboard
shortcut (which now leaves ExtendMode on), you could move the start of the
selection the same way.

Regards,
Klaus

Sub SelectionToggleActiveEnd()
Dim boolOldExtendMode As Boolean
boolOldExtendMode = Selection.ExtendMode
With Selection
Select Case .StartIsActive
Case True
.StartIsActive = False
ActiveDocument.ActiveWindow.ScrollIntoView _
obj:=.Range, Start:=False
Case False
.StartIsActive = True
ActiveDocument.ActiveWindow.ScrollIntoView _
obj:=.Range, Start:=True
End Select
End With
' Any macro will kill the ExtendMode when it quits (yukk!!)
' So we need SendKeys to turn it back on (more yukk!!)
If boolOldExtendMode Then
SendKeys ("{F8}")
End If
End Sub
 
Suzanne S. Barnhill said:
I recall reading that somewhere long ago (perhaps in Help, perhaps
in some "tips" column), but since I don't use F8, I'd never used it.

I use ExtendMode quite a bit, often together with
"BrowseNext/BrowsePrevious" (Ctrl+PgDown, Ctrl+PgUp), to select everything
up to the next heading or table, or the next/previous occurrence of some
word or text or character.
The "key twist" makes the latter a lot easier.
It is definitely not in Word 2003 Help (at least not in the "Keyboard
shortcuts" topic).

Klaus
 
More goodies: The Enter key for the next paragraph mark works, and
Shift+Enter for manual line breaks, and so do Ascii-codes for the control
characters, say Alt+012 for the next page break or section mark, Alt+02 for
the next footnote/endnote, or Alt+07 followed by the "Left" key to select
anything up to the end of a cell in a table.

Klaus
 
Very useful indeed.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Very useful indeed.

Especially if you have such a sieve for a brain as me <g>

There are probably keyboard shortcuts that select to the end of a word,
sentence, or paragraph.
But I can never remember them when needed.

"F8, Space", "F8, .", "F8, ENTER" are easier to remember...

Klaus
 
Ctrl+arrow keys (left and right) will extent to start and end of word
respectively - which is really just the same as pressing Ctrl+Shift+arrow
without doing F8 (the two operations are essentially the same).

Ctrl+arrow keys (up and down) will similarly extend to start and end of
paragraph respectively.

Repeated pressing of F8 will extend the selection outwards to word,
sentence, paragraph, section, document - and Shift+F8 will reverse the
sequence.
 
The cited Help topic gives other suggestions in a Tip: "If you know the key
combination to move the insertion point, you can generally select the text
by using the same key combination while holding down SHIFT. For example,
CTRL+RIGHT ARROW moves the insertion point to the next word, and
CTRL+SHIFT+RIGHT ARROW selects the text from the insertion point to the
beginning of the next word." For other shortcuts, see "Extend a selection"
under "Editing and moving text and graphics" in the "Keyboard shortcuts"
topic.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
For your amusement...

It's not obviously mentioned in Word 2003 or Word 2002 Help. Techies might
find a hint that it exists in Word VBA help for any version of Windows Word
up to 2003 (don't know about 2007)

Before that (Word 2000,97,95,6 I think,2), the general idea of extending to
a character is generally covered in a Help item called "Selecting Text and
Graphics" or some such. The section is a bit split up so you might miss the
bit about extending to a character, and different versions say more or less
about what characters can be used.

The feature itself has been there since Word 1, whose glossy hardcover
manual (remember that?) says:
-----------------------------
Selecting to a Character

1 Press the EXTEND SELECTION key (F8).

2 Press the key of any character in the document (including Enter) to
select to the next occurence of that character.

As long as extend mode is on (status bar displays EXT), you can press a key
for any additional character to continue expanding the selection.
 
I have manuals for Word 2.0 and 6.0, and I'm always impressed by how
thorough they are, though the best bits are said to be in the online Help
(to which I no longer have access since I don't have those versions
installed). I'm also always impressed by how long the features I'm just now
discovering have been in the product. <g>

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Hi Peter,

Thanks! You are much better organized than me... I threw away all the old
manuals and stuff.

That it actually was in the help file for Word 1 and got thrown out 2002
seems really weird.
Maybe Microsoft's way to deprecate a feature they felt wasn't used enough to
continue supporting?

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top