It turns out to be surprisingly hard to do this with VBA. The problem is
that there's no event that tells VBA explicitly when the selection is about
to exit from a table cell.
You could write macros named NextCell and PreviousCell to intercept the
press of the Tab or Shift+Tab keys in a table and convert the case of the
cell's contents. But those wouldn't run if the user pressed the arrow keys
or used the mouse to move the cursor.
You could write an event handler for the WindowSelectionChange event
(
http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm). But the Sel
parameter (the selection, which represents the cursor position) of that
event tells you where the cursor moved to, not where it came from, so you'd
have to do some very tricky programming to figure out whether there is a
previous cell and, if so, whether the cursor actually came from that cell or
from somewhere else (possibly even a different document). I'm not sure it
could be done rigorously.
It would be much simpler to apply a paragraph style to the table, and
include the All Caps font formatting as part of that style. Then anything
typed there, whether upper or lower case, would appear in upper case.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.