Option Explicit Rem This example shows how to create a path of straight lines and Rem how to create a path with smooth lines Private Sub Command1_Click() Dim appRef As New Illustrator.Application Dim linePath As Illustrator.PathItem Dim smoothPath As Illustrator.PathItem appRef.Documents.Add Rem Create a color to use for the paths Dim greenColor As New Illustrator.Color Dim greenCMYKColor As New Illustrator.CMYKColor greenCMYKColor.Black = 0 greenCMYKColor.Cyan = 81.96 greenCMYKColor.Magenta = 0 greenCMYKColor.Yellow = 100 greenColor.CMYK = greenCMYKColor Rem Create the first path from 4 straight lines Set linePath = appRef.ActiveDocument.PathItems.Add linePath.SetEntirePath Array(Array(100, 100), _ Array(300, 300), _ Array(100, 300), _ Array(300, 100)) linePath.Closed = False linePath.Stroked = True linePath.StrokeWidth = 2 linePath.StrokeColor = greenColor linePath.Filled = False linePath.StrokeJoin = aiRoundEndJoin Rem Create the smooth path greenCMYKColor.Yellow = 32 greenColor.CMYK = greenCMYKColor Set smoothPath = appRef.ActiveDocument.PathItems.Add smoothPath.Closed = False smoothPath.Stroked = True smoothPath.StrokeWidth = 2 smoothPath.StrokeColor = greenColor smoothPath.Filled = False Rem create the PathPoints that the smooth path is Rem constructed from Dim newPathPoint As Illustrator.PathPoint Set newPathPoint = smoothPath.PathPoints.Add newPathPoint.Anchor = Array(100, 100) newPathPoint.LeftDirection = Array(100, 20) newPathPoint.RightDirection = Array(100, 180) newPathPoint.PointType = aiSmooth Set newPathPoint = smoothPath.PathPoints.Add newPathPoint.Anchor = Array(300, 300) newPathPoint.LeftDirection = Array(330, 250) newPathPoint.RightDirection = Array(270, 350) newPathPoint.PointType = aiSmooth Set newPathPoint = smoothPath.PathPoints.Add newPathPoint.Anchor = Array(100, 300) newPathPoint.LeftDirection = Array(130, 350) newPathPoint.RightDirection = Array(70, 250) newPathPoint.PointType = aiSmooth Set newPathPoint = smoothPath.PathPoints.Add newPathPoint.Anchor = Array(300, 100) newPathPoint.LeftDirection = Array(300, 180) newPathPoint.RightDirection = Array(300, 20) newPathPoint.PointType = aiSmooth End Sub