Share via


StencilCharactersPerLine Property [Visio 2003 SDK Documentation]

For shapes on stencils, determines approximately how many characters of each shape's name appear on each line before the text wraps to the next line.

longRet = object.StencilCharactersPerLine

object.StencilCharactersPerLine = longVal

longRet    Long. Current number of stencil characters per line.

object    Required. An expression that returns an ApplicationSettings object.

longVal   Required Long. New number of stencil characters per line.

Version added

2003

Remarks

Setting the StencilCharactersPerLine property is equivalent to setting the Characters per line option under Stencil spacing on the View tab in the Options dialog box (Tools menu).

The minimum value for StencilCharactersPerLine is 5 characters per line and the maximum is 20. By default, Visio displays 12 characters per line.

This property affects the overall spacing of shapes on a stencil, which affects how many shapes the user can see without scrolling.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the StencilCharactersPerLine property to print the current number of stencil characters per line in the Immediate window. It also shows how to get an ApplicationSettings object from the Visio Application object.

Public Sub StencilCharactersPerLine_Example()

    Dim vsoApplicationSettings As Visio.ApplicationSettings
    Dim lngCharsPerLine As Long

    Set vsoApplicationSettings = Visio.Application.Settings
    lngCharsPerLine = vsoApplicationSettings.StencilCharactersPerLine

    Debug.Print lngCharsPerLine

End Sub

Applies to | ApplicationSettings object

See Also | Application object | Settings property