Dim sort As New sorter' sorter is an internal class; its syntax and use can change. Just used to demonstrate how it could workDim text As StringDim words As Variant, uniqueWords List As IntegerDim sorted As Variant, sortedVals As VariantDim count As Integer, scale As DoubleDim hr As rtHRule, cnt as integertext = doc.getFirstItem("Body").Textwords = Tokenize(text) ' this is just an internal function with limited use - not a part of the product