Community
dg2405,
Good afternoon! Not completely sure if this is what you're after, but here is a short video illustrating how to switch from one balloon style to another. Hope this helps and have a most blessed day!
You can either change all balloons, or prompt the users for the ones to change.
prompt for user selection
While True Try ' Get balloon from user selection Dim oBalloon As Balloon oBalloon = ThisApplication.CommandManager.Pick( _ SelectionFilterEnum.kDrawingBalloonFilter, "Pick a baloon") If oBalloon Is Nothing Then MessageBox.Show ("Selection was cancelled","ilogic") Beep Exit While End If End While
Change all balloons on all sheets
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oStyles As DrawingStylesManager oStyles = oDrawDoc.StylesManager 'process all sheets For Each oSheets In oDrawDoc.Sheets ' Iterate over each balloon on the sheet. For Each oBalloon In oActiveSheet.Balloons 'replace "Tags" to your style name oBalloon.Style = oStyles.BalloonStyles.item("Tags") Next Next
Good Luck
It has come to my attention that the iLogic code I have posted before is wrong and not working.
Here is the corrected version:
Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument Dim oStyles As DrawingStylesManager oStyles = oDrawDoc.StylesManager Dim oSheet As Sheet Dim oBalloon As Balloon For Each oSheet In oDrawDoc.Sheets For Each oBalloon In oSheet.Balloons oBalloon.Style = oStyles.BalloonStyles.Item("Tag") Next Next
Can't find what you're looking for? Ask the community or share your knowledge.