Here's my macro, I'm not a pro in this field, it's my second. And the basis of the macro comes from this forum. I try to make a macro that erases the bubbles to rest them but I block.
Option Explicit
Sub Main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swView As SldWorks.View
Dim swNote As SldWorks.Note
Dim swAnn As SldWorks.Annotation
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
If swModel.GetType <> swDocumentTypes_e.swDocDRAWING Then
MsgBox "Ouvrir un dessin", vbOKOnly + vbInformation
Exit Sub
End If
Set swDraw = swModel
Set swView = swDraw.GetFirstView
swModel.ClearSelection2 True
While Not swView Is Nothing
Set swNote = swView.GetFirstNote
While Not swNote Is Nothing
If swNote.IsBomBalloon Then
Set swAnn = swNote.GetAnnotation
swAnn.Select3 True, Nothing
End If
Set swNote = swNote.GetNext
Wend
Set swView = swView.GetNextView
Wend
swModel.EditDelete
End Sub