本示例通过起始和结束字符位置判断所选内容的长度。

SelLength = Selection.End - Selection.Start
MsgBox SelLength