イラストレーターのアクションを使う

Imports System.Threading

Label1.Text = "70%縮小しています"
Me.Refresh()

If CheckBox1.Checked = True Then
	Try
		IllApp.DoScript("Reduction70", "VB60")
		While IllApp.ActionIsRunning = True
			Thread.Sleep(100)
		End While
	Catch ex As Exception
		MsgBox("イラストレーターにアクション「VB60」を入れて下さい")
		CloseFn(IllDoc, SaveDoc)
		Exit Sub
	End Try
End If

Public Sub CloseFn(ByVal IllDoc As Document, ByVal SaveDoc As Document)
	IllDoc.Close(AiSaveOptions.aiDoNotSaveChanges)
	'COMオブジェクトの開放()
	If Not IllDoc Is Nothing Then System.Runtime.InteropServices.Marshal.ReleaseComObject(IllDoc)
	SaveDoc.Close(AiSaveOptions.aiDoNotSaveChanges)
	'COMオブジェクトの開放()・・・保存してファイルを閉じる
	If Not SaveDoc Is Nothing Then System.Runtime.InteropServices.Marshal.ReleaseComObject(SaveDoc)
End Sub