Re: Wordcount in tables
- From: Helmut Weber <nbhymsjxdgcn@xxxxxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 17:43:40 +0100
Hi John,
Text in cell(1,1) is "Red Brown"
Sub Test04()
With ActiveDocument.Tables(1).Cell(1, 1).Range
MsgBox .ComputeStatistics(wdStatisticWords)
End With
End Sub
returns 0 (zero) :-(
But as selection is often faster in tables anyway,
you may google for my decent name and "selection table speed",
or similar, if you like.
I'd recommend something like that:
Sub Test04a()
With ActiveDocument.Tables(1).Cell(1, 1).Range
..Select
Selection.End = Selection.End - 1
MsgBox Selection.Range.ComputeStatistics(wdStatisticWords) ' 2
End With
End Sub
HTH
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
.
- References:
- Wordcount in tables
- From: John Svendsen
- Re: Wordcount in tables
- From: Helmut Weber
- Re: Wordcount in tables
- From: John Svendsen
- Wordcount in tables
- Prev by Date: Re: HDI: retain envelope format settings?
- Next by Date: Re: Identify page on which a bookmark is located
- Previous by thread: Re: Wordcount in tables
- Next by thread: Re: Wordcount in tables
- Index(es):
Relevant Pages
|