Detect if text is too long to fit in a cell

L

Ludo

Hi,

I have a macro that fills a table (in Word XP) with some data. The table is
created manually before the execution of the macro, and I access it with :

Set objTable = ActiveDocument.Tables(1)

It works perfectly, but for some cells, the text is too long to fit in, and
it is automatically word-wrapped in two lines. As my cells's height is for
one line of text, I can't read some characters.

My question : is it possible to detect if the text of a cell is too long for
it (or if it is word-wrapped) ? My idea is to reduce font size for theses
cells.

Thanks
Ludovic Balogh
 
H

Helmut Weber

Hi Ludo,

see above the thread
"How do I tell if text fits into a fixed-width table cell"

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top