03-22-2022
08:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-22-2022
08:55 AM
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