![]() |
|
#2
|
||||
|
||||
|
Microsoft's definition of what is a 'word' apparently includes punctuation but this might get you started
Code:
Sub ExpandWords()
Dim x As Integer
x = InputBox("How many words?", "Counter", 10)
If x > 0 Then
Selection.MoveRight Unit:=wdWord, Count:=x, Extend:=True
End If
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBA Search Table for Text/Select Text/Insert Hyperlink | sldrellich | Word VBA | 3 | 03-24-2015 01:09 PM |
| Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
Select section of text and change text
|
newbieX | Word VBA | 3 | 03-28-2014 04:21 PM |
| Limit text length Content Control | NobodysPerfect | Word | 10 | 02-28-2014 02:40 PM |
Import from variable length text
|
diouna | Excel | 3 | 07-10-2012 09:43 PM |