Dim appRef As New Illustrator.Application
Dim triangleGroup As Illustrator.GroupItem
'Create a new group in the active document.
'This will be the group that holds the new triangle art
Set triangleGroup = appRef.ActiveDocument.GroupItems.Add
'Create a triangle and add text inside the group
Dim trianglePath As Illustrator.PathItem
Dim captionText As Illustrator.TextFrame
Set trianglePath = triangleGroup.PathItems.Add
trianglePath.SetEntirePath Array(Array(100, 100), Array(300, 100), _
Array(200, Math.Tan(1.0471975) * 100 + 100))
Set captionText = triangleGroup.TextFrames.Add
captionText.Position = Array(100, 100)
captionText.Contents = "A triangle"