Microsoft KB Archive/254600
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
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:
[GRAPHIC: Picture showing increased text size after adding ShapeSheet formulas]
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
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.
To make a shape's height dependent on the amount of text that you type into it:
- 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.
- Click the Pointer tool, select the rectangle, and then click Show ShapeSheet on the Window menu.
- In the ShapeSheet window, add the following formulas:
Cell Formula Width 2 in. (or the width you want) Height GUARD(MAX(1 in., TEXTHEIGHT(TheText,Width)))
- Close the ShapeSheet window. Test the formulas by typing several lines of text in the shape.
For information about working with text and text blocks, click Visio Help on the Help menu, and then on the Index tab, search for "text."
Keywords: kbGraphxLink kbgraphxlinkcritical KB254600
Technology: kbVisio2000Search kbVisio500xSearch kbVisioSearch kbZNotKeyword3