Maybe I've misunderstood but whilst it's clunky I think this should work on
a standard table
Create a self-calling ontime macro (period ~1s, initiate on selection change
into a cell) to check the IP is in a table, if so then use the Selection to
get the current cell and its range (Set rangeObj =
selection.range.cells(1).range) and then use
rangeObj.ComputeStatistics(wdStatisticWords) to get the word count (don't
use a count on a word collection - that counts punctuation too). Very few
instructions in the ontime macro so shouldn't interfere too much with
typing...
Then if the word count has changed put the result in the cell below the
entry cell (for thebenefit of the user doing so without changing the
selection). Of course the user can easily click into an ordinary cell but
since you want to Show the count this would be OK (or you could present the
current word count in the status bar and avoid complicating the document
[If you want to get your hands very dirty you *can* trap key down events
(with appropriate dll usage) and avoid a clunky ontime approach, but whether
or not that would be worth the effort I don't know...]
HTH
--
Julian I-Do-Stuff
Some Vista stuff, but mostly just Stuff at
http://berossus,blogspot.com
macropod said:
Hi,
You can't do that with data entry into the table cell or textbox. However,
if you use a userform (not a formfield) for data entry, that could be
coded to return a progressive word count.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
Mr. Smith said:
Hi.
I have a form created in Word. I've used tables to stucture the form. Is
it possible to show the wordcount for a cell in a table direclty in the
cell below.
The users are limited to 250 words i a certain cell, and it would be very
nice to show the actual word count dynamically as they write.
Could it be solved through textboxes if cells are impossible to
"identify"?
Kind regards
Mr. Smith