Page.DropLegend method (Visio)

Inserts a data graphics legend on a Microsoft Visio drawing page. Returns the list shape instance specified in the OuterList parameter.

Note

This Visio object or member is available only to licensed users of Visio Professional 2013.

Syntax

expression. DropLegend( _OuterList_ , _InnerList_ , _populateFlags_ )

expression An expression that returns a Page object.

Parameters

Name Required/Optional Data type Description
OuterList Required [UNKNOWN] A Master or MasterShortcut object that represents the legend object. Corresponds to the outermost list shape.
InnerContainer Required [UNKNOWN] A Master or MasterShortcut object that represents the legend object. Corresponds to the inner field container shape used within the legend for each data-graphic field.
populateFlags Required VisLegendFlags A flag that specifies whether Visio should populate the legend.

Return value

Shape

Remarks

The value of the populateFlags parameter must be one of the following VisLegendFlags constants.

Constant Value Description
visLegendPopulate 0 Insert the legend and populate it.
visLegendNoContents 1 Insert the legend but don't populate it.

If you pass visLegendPopulate for the populateFlags parameter, Visio inserts the legend and populates it with eligible data-graphic items in use on the specified drawing page. If no such items exist, Visio returns the error EU_API_NOOP, "Operation succeeded but no action taken."

If you pass visLegendNoContents for the populateFlags parameter, Visio inserts a legend that consists of the outer list shape as well as a single inner container shape, which contains an inner list shape but has no heading text.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.