I want to be able to check if the text in a paragraph text box is too large for the box and goes outside of it (when the border turns red). Is there a way to do this with VBA?
I see there is a property called "IsInsideContainer", so I want to be able to do something like this, but I can't get it to work:
If cdrTextBox.Text <> IsInsideContainer Then
I think that Text.Overflow might be what you are looking for.
You might find something useful in this thread: Macro to convert artistic text frame to paragraph text frames.
One of the code examples includes some code (from a Shelby Moore post on the Oberon forum) to increase the height of the frame until no overflow condition exists.
You might have to work a bit to see the entire thread. The forum software likes to hide stuff, and make you click "Load Next" or "Load Previous" to see more.
Perfect, thank you!!
If cdrTextBox.Text.Overflow Then cdrTextBox.Text.FitTextToFrame End If