You may use the following as a starting point (I don't know how you want to
use the count).
The following line of code will show the number of characters in the first
cell in the selection, incl. the end of cell marker (which counts 2) – in
case of a single cell, you do not need to select the text first. It is
sufficient that the insertion point be in the cell:
MsgBox Len(Selection.Cells(1).Range)
If you want to exclude the end of cell marker, subtract 2 from the count:
MsgBox Len(Selection.Cells(1).Range) - 2
For example, if the cell contains the text "This is my text" (a total of 15
characters), the first code line will 17 and the second will return 15.
Please post back if you need help with the entire macro. In that case, you
need to explain how you want to use the macro.
--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word