View Single Post
 
Old 04-27-2015, 06:26 PM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote