BTW, a good example of what I'm talking about can be seen in Word. When
you doing automatic sizing in Word with the wrap text option selected,
the shape width remains the same but the height adjusts to fit.
BTW, a good example of what I'm talking about can be seen in Word. When
you doing automatic sizing in Word with the wrap text option selected,
the shape width remains the same but the height adjusts to fit.
Hi Nick,
Couple of ways -
Put text into a cell in an empty row and set column to pre determined width.
Wrap text. Autofit the column and return it's height.
A textbox will autosize to height if the text has line breaks. This would
entail guestimating max characters that would fit into your pre-determined
width, finding the first space to the left of the end and replacing with a
linefeed, not chr(13) or vbCr, but a single vbLf or chr(10).
Also pad one line with characters that will autosize to correct width (to be
removed later). Cater for margins.
Once autosize'd, if you want to replace text without the line feeds, remove
the Autosize setting having got the new dimensions to re-dimension if
necessary.
I find textbox autosize more accurate than sheet column autosize. The latter
approximates according to the default font width and the small cell indent
is slightly version dependant. However the cell method is much simpler,
although there is a max string length limit.
Not sure I've explained all that very well!
Regards,
Peter T
PS Maybe a third way might be to do it in a hidden instance of Word the way
you say - never tried.
"Nick Hebb" <n.hebb@comcast.net> wrote in message
news:1131131450.056545.174890@g49g2000cwa.googlegroups.com...
> BTW, a good example of what I'm talking about can be seen in Word. When
> you doing automatic sizing in Word with the wrap text option selected,
> the shape width remains the same but the height adjusts to fit.
>
Typo
> Autofit the column and return it's height.
should read of course
Autofit the row (entirerow) and return it's height.
Peter T
"Peter T" <peter_t@discussions> wrote in message
news:#TcXOdi4FHA.2548@TK2MSFTNGP10.phx.gbl...
> Hi Nick,
>
> Couple of ways -
>
> Put text into a cell in an empty row and set column to pre determined
width.
> Wrap text. Autofit the column and return it's height.
>
> A textbox will autosize to height if the text has line breaks. This would
> entail guestimating max characters that would fit into your pre-determined
> width, finding the first space to the left of the end and replacing with a
> linefeed, not chr(13) or vbCr, but a single vbLf or chr(10).
> Also pad one line with characters that will autosize to correct width (to
be
> removed later). Cater for margins.
>
> Once autosize'd, if you want to replace text without the line feeds,
remove
> the Autosize setting having got the new dimensions to re-dimension if
> necessary.
>
> I find textbox autosize more accurate than sheet column autosize. The
latter
> approximates according to the default font width and the small cell indent
> is slightly version dependant. However the cell method is much simpler,
> although there is a max string length limit.
>
> Not sure I've explained all that very well!
>
> Regards,
> Peter T
>
> PS Maybe a third way might be to do it in a hidden instance of Word the
way
> you say - never tried.
>
>
>
> "Nick Hebb" <n.hebb@comcast.net> wrote in message
> news:1131131450.056545.174890@g49g2000cwa.googlegroups.com...
> > BTW, a good example of what I'm talking about can be seen in Word. When
> > you doing automatic sizing in Word with the wrap text option selected,
> > the shape width remains the same but the height adjusts to fit.
> >
>
>
> Not sure I've explained all that very well!
Explanations were perfectly clear.
Unfortunately, nothing is really working well for the non-rectangular
autoshapes like flowchart decision shapes (diamonds). It would be a lot
easier if I could get a handle for the textframe object and determine
it's width. But for now I've had to do mockups for each shape based on
the standard font and make adjustments for different fonts and sizes.
It's gotten fairly convoluted.
OK I follow your objective. Doable but rather you than me!
Regards,
Peter T
"Nick Hebb" <n.hebb@comcast.net> wrote in message
news:1131214961.989803.89850@g44g2000cwa.googlegroups.com...
> > Not sure I've explained all that very well!
>
> Explanations were perfectly clear.
>
> Unfortunately, nothing is really working well for the non-rectangular
> autoshapes like flowchart decision shapes (diamonds). It would be a lot
> easier if I could get a handle for the textframe object and determine
> it's width. But for now I've had to do mockups for each shape based on
> the standard font and make adjustments for different fonts and sizes.
> It's gotten fairly convoluted.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks