Hi Gd1,
How can I check if a paragraph fits into a cell without "breaking" its
height using VBA?
Not easily, if at all. The .Information property of the Range/Selection
objects does provide a way to get the RelativeHorizontal position of a
"point". So you could get that from the end and start points, calculate
the difference, and compare it to the available cell width less cell
padding. But it's not *guaranteed* to work exactly. And if different
fonts are applied in the two places, all bets are off.
The better approach would probably be to put the paragraph into the cell
then count the number of lines.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail