![]() |
|
#7
|
||||
|
||||
|
Simpler:
Code:
Sub Demo() With ActiveDocument MsgBox .Range(0, InStr(.Range.Text, "My String")).ComputeStatistics(wdStatisticWords) - 1 End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
generating a number in Word
|
John P | Word | 1 | 05-31-2012 10:29 PM |
auto number in word
|
expert4knowledge | Word | 7 | 05-31-2012 02:37 PM |
Mailing: how to make the "page number" in Word is the same as "row number" in excel w
|
Jamal NUMAN | Word | 1 | 09-03-2011 11:37 AM |
| Textbox Number changes when I open Word | t0m46 | Word VBA | 0 | 09-07-2010 05:46 AM |
| Number formatting in Word table | 8braitp | Word Tables | 0 | 08-27-2009 04:12 AM |