#1
|
|||
|
|||
VBA equivalent to selecting present word
I'm just looking for a way in VBA to select the present word when the selection point is anywhere within the Word. I.e., to do the same thing as when you double-click on a Word and it selects the same.
Thank you! |
#2
|
|||
|
|||
It looks like the .Extend and .Expand methods of the Selection object might do what you want. This is from the help for extend:
Code:
With Selection ' Collapse current selection to insertion point. .Collapse ' Turn extend mode on. .Extend ' Extend selection to word. .Extend ' Extend selection to sentence. .Extend End With Code:
Selection.Expand ' default unit is wdWord |
#3
|
|||
|
|||
Perfect! I'll try the Selection.Expand.
Thanks! |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
folders present but not listed under email | confuseis | Outlook | 0 | 05-21-2012 02:06 PM |
Autocorrect in Word not selecting proper entry from list | Llewella | Word | 4 | 05-12-2012 02:22 PM |
If I reinstall Outlook, will I retain my present files | natureandpictures | Outlook | 2 | 05-11-2011 08:28 AM |
Selecting merge field based on whether or not text is present | amym | Mail Merge | 1 | 12-07-2010 05:14 AM |
ClipMate equivalent in Word? | P. Alkuin | Word | 0 | 03-11-2010 03:36 AM |