Expand Minimize
This topic has not yet been rated - Rate this topic

ApplicationSettings.StencilCharactersPerLine Property (Visio)

Published: July 16, 2012

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.

Version Added: Visio 2003

expression .StencilCharactersPerLine

expression A variable that represents an ApplicationSettings object.

Return Value

Long

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.

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
Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.