Share via


Protecting Local Shape Formats

Applying a style can change the formulas in the Line Format, Fill Format, Text Block Format, Character, Paragraph, and Tab ShapeSheet® sections for a shape. If they are not protected, local (custom) formulas in the related ShapeSheet cells can be overwritten. For example, you might have written a custom formula in the Size cell of the Character section of a shape in a master to dynamically change the font size of your master based on its text block height. If a user applies a different text style to the shape, the custom formula is overwritten.

You can protect local shape formats by using the Preserve local formatting option in the Style dialog box, by setting the LockFormat cell, or by using the GUARD function to protect formulas.

In this section…

Preserving Local Shape Formatting through the User Interface

Preserving Local Shape Formatting through the ShapeSheet Spreadsheet

Preserving Local Shape Formatting through the User Interface

You can protect local shape formatting by selecting the Preserve local formatting check box in the Style dialog box when applying a different style.

When you select Preserve local formatting, the style is applied, but local formatting is maintained. If Preserve local formatting isn't selected, the new style is applied, and any local formatting is overwritten.

TOP

Preserving Local Shape Formatting through the ShapeSheet Spreadsheet

Setting the LockFormat cell to 1 in the Protection section of a shape's sheet protects a shape from both formatting and style changes. Using the GUARD function in a formula prevents that cell from changing when a user applies formatting or styles. If you protect a group using the LockFormat cell, you automatically protect the shapes and other groups within it from inheriting formatting; however, users can subselect shapes in the group that are not explicitly locked and change their formatting. For details about protecting formatting in a group, see Chapter 6, Grouping and Merging Shapes.

Use the LockFormat cell and the GUARD function with care. When a shape is locked against formatting, Microsoft® Visio® automatically displays a message when a user tries to format the shape. In contrast, the GUARD function works without any notification or user messages. Either behavior can confuse or annoy users who want to format a protected shape. As you develop shapes, you must find the appropriate balance between limiting shape behavior and increasing user flexibility in your solution.