Class CalloutFormat (PowerPoint VBA)

Contains properties and methods that apply to line callouts.


To use a CalloutFormat class variable it first needs to be instantiated, for example

Dim cft as CalloutFormat
Set cft = ActiveWindow.RangeFromPoint.Callout

The following procedures can be used to set variables of type CalloutFormat: Shape.Callout and ShapeRange.Callout


Accent determines whether a vertical accent bar separates the callout text from the callout line.

ActivePresentation.Slides(1).Shapes(2).Accent = msoTrue

Angle returns or sets the angle of the callout line. If the callout line contains more than one line segment, this property returns or sets the angle of the segment that is farthest from the callout text box.

ActivePresentation.Slides(1).Shapes(2).Callout.Angle = msoCalloutAngleMixed

AutoAttach determines whether the place where the callout line attaches to the callout text box changes, depending on whether the origin of the callout line (where the callout points to) is to the left or right of the callout text box.

ActivePresentation.Slides(1).Shapes(2).Callout.AutoAttach = msoTrue

AutoLength determines whether the first segment of the callout retains the fixed length specified by the Length property, or is scaled automatically, whenever the callout is moved.

Dim mtsAutoLength As Office.MsoTriState
mtsAutoLength = ActivePresentation.Slides(1).Shapes(2).Callout.AutoLength

Border determines whether the text in the specified callout is surrounded by a border.

ActivePresentation.Slides(1).Shapes(2).Callout.Border = msoTrue

Drop for callouts with an explicitly set drop value, this property returns the vertical distance (in points) from the edge of the text bounding box to the place where the callout line attaches to the text box.

Dim sngDrop As Single
sngDrop = ActivePresentation.Slides(1).Shapes(2).Callout.Drop

DropType returns a value that indicates where the callout line attaches to the callout text box.

Dim mcdDropType As Office.MsoCalloutDropType
mcdDropType = ActivePresentation.Slides(1).Shapes(2).Callout.DropType

Gap returns or sets the horizontal distance (in points) between the end of the callout line and the text bounding box.

ActivePresentation.Slides(1).Shapes(2).Callout.Gap = 3

Length when the AutoLength property of the specified callout is set to False, the Length property returns the length (in points) of the first segment of the callout line (the segment attached to the text callout box).

Dim sngLength As Single
sngLength = ActivePresentation.Slides(1).Shapes(2).Callout.Length

Parent returns the parent object for the specified object.

Dim objParent As Object
Set objParent = ActiveWindow.RangeFromPoint.Callout.Parent

Type represents the type of callout.

ActiveWindow.RangeFromPoint.Callout.Type = msoCalloutMixed