CustomLength Method

Microsoft Publisher Visual Basic

expression.CustomLength(Length)

expression    Required. An expression that returns one of the objects in the Applies To list.

Length   Required Variant. The length of the first segment of the callout. Numeric values are evaluated in points; strings can be in any units supported by Microsoft Publisher (for example, "2.5 in").

Remarks

Applying this method sets the AutoLength property to False and sets the Length property to the value specified for the Length argument.

Use the AutomaticLength method to specify that the first segment of the callout line be scaled automatically whenever the callout is moved. Applies only to callouts whose lines consist of more than one segment (types msoCalloutThree and msoCalloutFour).

Example

This example toggles between an automatically-scaling first segment and one with a fixed length for the callout line for the first shape in the active publication. For the example to work, this shape must be a callout.

With ActiveDocument.Pages(1).Shapes(1).Callout
    If .AutoLength Then
        .CustomLength Length:=50
    Else
        .AutomaticLength
    End If
End With