Extracting Character Count via a macro

Until about 2 months ago I successfully used

     Chars = oDoc.CharacterCount

in a LO (5.0.3.2) Basic macro to retrieve the character count of a document.
But now, oDoc.CharacterCount always returns 0 regardless of the document's size.
Has something changed in the syntax? What am I overlooking/doing wrong?

Thanks for helping.

John