Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
maxim.teleguz
in reply to: cmcconnell

 

 

 

 

 

oDoc = ThisDoc.Document
oNamer = "change Balloons to see qty quickly"
Dim UNDO As Transaction 
UNDO = ThisApplication.TransactionManager.StartTransaction(oDoc, oNamer)
'undo in a set is important so that you dont accidently undo one by one and then when you run rule
'again it will change hald of what you undoed and the other half to what you want and create a mess

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oStyles As DrawingStylesManager
oStyles = oDrawDoc.StylesManager

Dim oSheet As Sheet
Dim oBalloon As Balloon


For Each oBalloon In ThisApplication.ActiveDocument.ActiveSheet.Balloons
	'clear overrides
    'oBalloon.BalloonValueSets(1).OverrideValue = "" 
	'oBalloon.SetBalloonType = "" 
	Call oBalloon.GetBalloonType(oBalloonType, oBalloonData)

		If oBalloonType = KCircularWithOneEntryBalloonType Then
			oBalloon.SetBalloonType(KCircularWithTwoEntriesBalloonType)
		Else If oBalloonType = KCircularWithTwoEntriesBalloonType Then
			oBalloon.SetBalloonType(KCircularWithOneEntryBalloonType)
		End If

Next 

UNDO.End

 

this code will change anything overridden