Selection.SetContainerFormat Method (Visio)
Changes the formatting of one aspect of all the containers in the selection, and returns an array of identifiers of shapes that belong to the containers and whose formatting was changed.
expression .SetContainerFormat(FormatType, [FormatValue])
expression An expression that returns a Selection object.
The container formatting to change. See Remarks for possible values.
The new format to apply.
The FormatType parameter must be one of the following VisContainerFormatType constants.
Apply one of the LockMembership property values, as specified in FormatValue. FormatValue is required, and must be of type Boolean (preferred) or or another type that can be converted to Boolean.
Apply one of the ResizeAsNeeded property values, as specified in FormatValue. Applies to normal containers only. FormatValue is required, must be of type Short (preferred) or of another type that can be converted to Short, and must be equal to a constant in the range of those in the VisContainerAutoResize enumeration.
Fit contents to the container. FormatValue is ignored.
If the selection does not include any containers, this method has no effect.
If FormatType is of an incorrect type or is out of the range of VisContainerFormatType, Microsoft Visio returns an Invalid Parameter error.