Microsoft KB Archive/254600

= Visio: Using the ShapeSheet Window to Control Text Size Behavior =

PSS ID Number: 254600

Article Last Modified on 6/4/2003

-

The information in this article applies to:


 * Microsoft Visio 2000 Standard Edition
 * Microsoft Visio 2000 Professional Edition
 * Microsoft Visio 2000 Technical Edition
 * Microsoft Visio 2000 Enterprise Edition
 * Microsoft Visio Standard 5.0x
 * Microsoft Visio Professional 5.0x
 * Microsoft Visio Technical 5.0x
 * Microsoft Visio Enterprise 5.0x

-



This article was previously published under Q254600



SUMMARY
Text in most Visio shapes remains at a constant point size when you resize the shape. In some cases, however, you might want the text to change its size when you resize the shape, or the shape to change its size to accommodate the text that you type.

To establish a relationship between a shape's size and its text size, you add formulas to the shape's ShapeSheet window, as shown in the picture below:





Adding Text Formulas in the ShapeSheet Window
The following procedures explain how to use the ShapeSheet window to create a relationship between shape size and text size.

To follow the procedures, you must be familiar with adding and editing ShapeSheet formulas. For information about the ShapeSheet window, click Visio Help on the Help menu, and then on the Index tab, search for "shapesheet."

NOTE: You can use any full Visio program to follow these procedures; however, this article uses Visio 5.0 menu commands. If you are not using a Visio 5.0 program, you need to adjust the procedure for your Visio program.

To make text point size dependent on a shape's height:  Select the shape, and then click Show ShapeSheet on the Window menu. Right-click the ShapeSheet window, and then on the shortcut menu, click View Sections. In the Sections dialog box, click to select the Shape Transform and Character Format check boxes, and then click OK. In the ShapeSheet window, scroll to the Character section, and then click the Size cell to display its value in the formula bar. Replace the text in the formula bar with the following formula

INT(TxtWidth*10)*1pt.

and then press ENTER.

NOTE: The number 10 in the formula is a variable. You can experiment with different values to find the proportions that you like. Close the ShapeSheet window. Test the formula by typing text into the shape and resizing it.</ol>

To make a shape's height dependent on the amount of text that you type into it: <ol> Start a new Visio drawing, and then with the Rectangle tool, draw a rectangle.

This procedure uses a rectangle that is 2 inches wide by 1 inch tall.</li> Click the Pointer tool, select the rectangle, and then click Show ShapeSheet on the Window menu.</li> In the ShapeSheet window, add the following formulas:

NOTE: The formula for the shape's height sets the minimum height of the shape to 1 inch. To change the minimum height, replace 1 in. with the value that you want.</li> Close the ShapeSheet window. Test the formulas by typing several lines of text in the shape.</li></ol>

<div class="references_section">