Callout Format Object Example

This example applies the same formatting to all the callouts in a worksheet:

Sub FormatAllCallouts() Dim oShp As Shape Dim oCF As CalloutFormat 'Loop through all the shapes in the sheet For Each oShp In ActiveSheet.Shapes

On Error GoTo MyExit 'Is this a callout?

If oShp.Type = msoCallout Then

'Yes - set its text box to autosize oShp.TextFrame.AutoSize = True

'Get the CalloutFormat object

Set oCF = oShp.Callout

'Format the callout With oCF .Gap = 0

.Border = msoFalse .Accent = msoTrue .Angle = msoCalloutAngle3 0 .PresetDrop msoCalloutDropCenter End With End If

Next Exit Sub


MsgBox "One or more of your Callouts do not have text" End Sub

0 0

Post a comment