PassoloApp.GetTextCounts
Counts Words, letters and characters in a string. The count results are stored in the returned PslStringCounter object.
Syntax
Expression.GetTextCounts (Text as String) as PslStringCounter
Expression Required. Object of type PassoloApp
Text String. Words, letter and characters in this string are counted.
Example
Sub main
Dim s As String, msg As String
Dim sc As PslStringCounter
s = "This text contains 7 words, 41 letters and 57 characters."
Set sc = PSL.GetTextCounts(s)
msg = "The text contains " & CStr(sc.WordCount) & " words, "
msg = msg & CStr(sc.LetterCount) & " and "
msg = msg & CStr(sc.CharCount) & " characters."
MsgBox(msg)
End Sub