Resize text to fit shape, or vice versa

Started by Fontaine, October 27, 2009, 02:53:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fontaine

Imported about 1,000 lines from excel to a visio org chart, which equals about 1,000 entities on the chart.  A large handful of them have text that is too big for the shape.  Is there a way to auto-resize either the text or the shape, without having to do each one by hand?  Would be several hundred manual modifications that i don't look forward to doing.  Thanks.

vojo



you can scale the font:
    user.fontscale = (shape width / page width) * scale coefficent
    font size = user.fontscale

you can scale the shape....though this is more tricky since there are ramifications to location and groupings:
    user.shapesize = (txtwidth / page width) * scale coefficient

You can lock in the max text width:
    txtwidth = textwidth(thetext, xx mm)   this will limit the max size of the text row to xx mm
    (you can define a user cell and insert that field into the shape text....which is the "thetext cell")

These might help give you some ideas on how to do it

wapperdude

Just beware!  Any unique formatting that you do to an Org Chart shape will subsequently get clobbered by new import of data.  The wizard doesn't preserve formatting nor placement.  It might be beneficial to apply the desired affect suggested by Vojo via VBA code.  That way, you can import the data, then run the macro, have it search all shapes and apply necessary formatting.  Pretty much automated.

Wapperdude
Visio 2019 Pro