Getting Height of Document

To determine the height of the user content use the FTDocument.GetTotalPageLength function.  It returns the total height of the document.

So to get the height of yrou content you’d need to do something like this (where ftc is your FormattedText control):

dim dTotalHeight as double
dTotalHeight = ftc.getDoc.getTotalPageLength
ftc.Height = dTotalHeight

You’ll probably want to include a sensible maximum size. Since there’s no fixed limit to the document size you could end up with a very large control if a user does something unexpected like pasting in the entire contents of a book or something.