Share via


Styles.GetNames Method

Visio Automation Reference

Returns the names of all items in a collection.

Version Information
 Version Added:  Visio 4.5

Syntax

expression.GetNames(localeSpecificNameArray())

expression   A variable that represents a Styles object.

Parameters

Name Required/Optional Data Type Description
localeSpecificNameArray() Required String Out parameter. An array that receives names of members of the indicated object.

Return Value
Nothing

Remarks

If the GetNames method succeeds, localeSpecificNameArray() returns a one-dimensional array of n strings indexed from 0 to n - 1, where n equals the Count property of the object. localeSpecificNameArray() is an out parameter that is allocated by the GetNames method, which passes ownership back to the caller. The caller should eventually perform the SafeArrayDestroy procedure on the returned array. Note that the SafeArrayDestroy procedure has the side effect of freeing the strings referenced by the array's entries. (Microsoft Visual Basic and Visual Basic for Applications take care of this for you.)

ms427202.vs_note(en-us,office.12).gif  Note
Beginning with Microsoft Visio 2000, you can use both local and universal names to refer to Visio shapes, masters, documents, pages, rows, add-ons, cells, hyperlinks, styles, fonts, master shortcuts, UI objects, and layers. When a user names a shape, for example, the user is specifying a local name. Beginning with Microsoft Office Visio 2003, the ShapeSheet spreadsheet displays only universal names in cell formulas and values. (In prior versions, universal names were not visible in the user interface.)

As a developer, you can use universal names in a program when you don't want to change a name each time a solution is localized. Use the GetNames method to get the local name of more than one object. Use the GetNamesU method to get the universal name of more than one object.

See Also