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 :-)
GD1 - 29 Sep 2006 07:04 GMT
> The better approach would probably be to put the paragraph into the cell
> then count the number of lines.
I thought the same. Counting the lines is the best solution. But how
can I know how many points is tall, for example, one line of Verdana
7pt?
Thank you!
Robert M. Franz (RMF) - 30 Sep 2006 22:16 GMT
> I thought the same. Counting the lines is the best solution. But how
> can I know how many points is tall, for example, one line of Verdana
> 7pt?
The easiest way seems to be to _define_ an exact line heigt for the
paragraph.
HTH
Robert

Signature
/"\ ASCII Ribbon Campaign | MS
\ / | MVP
X Against HTML | for
/ \ in e-mail & news | Word
GD1 - 29 Sep 2006 07:04 GMT
> The better approach would probably be to put the paragraph into the cell
> then count the number of lines.
I thought the same. Counting the lines is the best solution. But how
can I know how many points is tall, for example, one line of Verdana
7pt?
Thank you!