AddCallout Method
AddCallout method as it applies to the CanvasShapes object.
Adds a borderless line callout to a drawing canvas. Returns a Shape object that represents the callout and adds it to the CanvasShapes collection.
expression.AddCallout(Type, Left, Top, Width, Height)
expression Required. An expression that returns a CanvasShapes object.
Type Required MsoCalloutType. The type of callout.
MsoCalloutType can be one of these MsoCalloutType constants. |
msoCalloutOne Positions callout line straight down along the left edge of the callout's bounding box. |
msoCalloutTwo Positions callout line diagonally down and away from the left edge of the callout's bounding box. |
msoCalloutThree Positions callout line straight out and then diagonally down and away from the left edge of the callout's bounding box. |
msoCalloutFour Positions callout line along the left edge of the callout's bounding box. |
msoCalloutMixed A return value indicating that more than one MsoCalloutType exists in a range or selection. |
Left Required Single. The position, in points, of the left edge of the callout's bounding box.
Top Required Single. The position, in points, of the top edge of the callout's bounding box.
Width Required Single. The width, in points, of the callout's bounding box.
Height Required Single. The height, in points, of the callout's bounding box.
AddCallout method as it applies to the Shapes object.
Adds a borderless line callout to a document. Returns a Shape object that represents the callout and adds it to the Shapes collection.
expression.AddCallout(Type, Left, Top, Width, Height, Anchor)
expression Required. An expression that returns a Shapes object.
Type Required MsoCalloutType. The type of callout.
MsoCalloutType can be one of these MsoCalloutType constants. |
msoCalloutOne Positions callout line straight down along the left edge of the callout box. |
msoCalloutTwo Positions callout line diagonally down and away from the left edge of the callout box. |
msoCalloutThree Positions callout line straight out and then diagonally down and away from the left edge of the callout box. |
msoCalloutFour Positions callout line along the left edge of the callout text box. |
msoCalloutMixed A return value indicating that more than one MsoCalloutType exists in a range or selection. |
Left Required Single. The position, in points, of the left edge of the callout's bounding box.
Top Required Single. The position, in points, of the top edge of the callout's bounding box.
Width Required Single. The width, in points, of the callout's bounding box.
Height Required Single. The height, in points, of the callout's bounding box.
Anchor Optional Variant. A Range object that represents the text to which the callout is bound. 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, such as balloons and clouds, using the AddShape method.
Example
As it applies to the CanvasShapes object.
This example adds a callout to a newly created drawing canvas.
Sub NewCanvasCallout()
Dim shpCanvas As Shape
'Add drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas _
(Left:=150, Top:=150, Width:=200, Height:=300)
'Add callout to the drawing canvas
shpCanvas.CanvasItems.AddCallout _
Type:=msoCalloutTwo, Left:=100, _
Top:=40, Width:=150, Height:=75
End Sub
As it applies to the Shapes object.
This example adds a callout to the current document and then sets the callout angle.
Sub NewCallout()
Dim shpCallout As Shape
'Add callout to the current document
Set shpCallout = ThisDocument.Shapes.AddCallout( _
Type:=msoCalloutTwo, Left:=InchesToPoints(1.25), _
Top:=36, Width:=100, Height:=25)
'Add text to the callout
shpCallout.TextFrame.TextRange.Text = "This is a Callout."
'Format the angle of the callout line to 30 degrees
shpCallout.Callout.Angle = msoCalloutAngle30
End Sub