Private Sub Command1_Click()
Dim appRef As New Illustrator.Application
Dim frontDocument As Illustrator.Document
Dim textColor As New Illustrator.Color
Dim textRGBColor As New Illustrator.RGBColor
Dim curtextArt As Illustrator.TextArtItem
Set frontDocument = appRef.Documents.Add(aiDocumentRGBColor, 600, 800)
With textRGBColor
.Red = 0
.Green = 200
.Blue = 0
End With
textColor.RGB = textRGBColor
Set curtextArt = frontDocument.ActiveLayer.TextArtItems.Add
With curtextArt
.Kind = aiPointText
.Contents = "ポイント"
.Position = Array(80, 730) ' 開始位置(x,y)
With .TextRange
.Filled = True ' 塗りつぶし
.FillColor = textColor ' 色
.Stroked = False ' 輪郭
.Font = "MS-PMincho" ' MS-PGothic
.Size = 50 ' サイズ
End With
End With
Set curtextArt = frontDocument.ActiveLayer.TextArtItems.Add
With curtextArt
.Kind = aiPointText
.Contents = "テキスト"
.Position = Array(80, 660) ' 開始位置(x,y)
With .TextRange
.Filled = True ' 塗りつぶし
.FillColor = textColor ' 色
.Stroked = False ' 輪郭
.Font = "MS-PMincho" ' MS-PGothic
.Size = 50 ' サイズ
End With
End With
End Sub
|