If Selection.End - Selection.Start > 0 Then MsgBox "Есть выделение!" Else MsgBox "Весь текст!" End If