Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to change Balloon Style?

dg2405
Advocate

How to change Balloon Style?

dg2405
Advocate
Advocate

Hello,

 

how can i change a balloon style to another one?

0 Likes
Reply
969 Views
3 Replies
Replies (3)

petestrycharske
Advisor
Advisor

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!

 

 

 
Peace,
Pete
Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
0 Likes

salariua
Mentor
Mentor

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

Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
0 Likes

salariua
Mentor
Mentor

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
Adrian S.
blog.ads-sol.com 

AIP2012-2020 i7 6700k AMD R9 370
Did you find this reply helpful ?
If so please use the Accepted Solutions or Like button - Thank you!
0 Likes