ApplicationSettings.StencilCharactersPerLine property (Visio)

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. Read/write.

Syntax

expression.StencilCharactersPerLine

expression A variable that represents an ApplicationSettings object.

Return value

Long

Remarks

Setting the StencilCharactersPerLine property is equivalent to setting the Characters per line option under Stencil spacing on the Advanced tab in the Visio Options dialog box (click the File tab, and then click Options).

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

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.