DockedStencils method

Microsoft Visio Developer Reference

DockedStencils method

       

Returns the names of all stencils docked in a Microsoft Visio drawing window.

Version added

4.5

Syntax

object.DockedStencils nameArray

object

Required. An expression that returns a Window object.

nameArray

Required String. Array that receives the names of stencils docked in a window.

Remarks

The DockedStencils method returns an array of strings—the names of the stencils shown in the docked stencil panes of a window. When the window is a drawing window, the number of docked stencil panes (n) is equal to or greater than zero, and n is zero when the window isn't a drawing window.

If the DockedStencils method succeeds, nameArray returns a one-dimensional array of n strings indexed from zero (0) to n - 1. The nameArray argument is an out argument that is allocated by the DockedStencils method, ownership of which is passed 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. The DockedStencils method fails if nameArray is null. (Microsoft Visual Basic and Visual Basic for Applications take care of destroying the array for you.)

If si is the string returned by nameArray(i), then Documents.Item(si) succeeds and returns a Document object representing the stencil.