AddCallout Method
Applies To
Shapes collection object.
Description
Creates a borderless line callout. Returns a Shape object that represents the new callout.
Syntax
expression.AddCallout(Type, Left, Top, Width, Height, Anchor)
expression Required. An expression that returns a Shapes collection.
Type Required Long. Can be one of the following MsoCalloutType constants: msoCalloutOne (a single-segment callout line that can be either horizontal or vertical), msoCalloutTwo (a single-segment callout line that rotates freely), msoCalloutThree (a two-segment line), or msoCalloutFour (a three-segment line).
Left, Top Required Single. The position (in points) of the upper-left corner of the callout's bounding box, relative to the anchor.
Width, Height Required Single. The width and height of the callout's bounding box, in points.
Anchor Optional Variant. A Range object that represents the text that the callout is bound to. If Anchor is specified, the anchor is positioned at the beginning of the first paragraph in the anchoring range. If this argument is omitted, the anchoring range is selected automatically and the callout is positioned relative to the top and left edges of the page.
Remarks
You can insert a greater variety of callouts by using the AddShape method.
See Also
AddShape method, CalloutFormat object.
Example
This example adds a callout to a newly created document and then sets the callout angle to 45 degrees.
Set myDocument = Documents.Add
Set myCall = myDocument.Shapes.AddCallout(msoCalloutTwo, 72, 36, 25, 25)
myCall.Callout.Angle = msoCalloutAngle45