操作系统是WindowsXP,Office版本2003,插图画家使用10。
使用Excel VBA,并尝试打印插图文件。
如果运行以下代码,则会在调用aiDocRef.PrintOut
时发生错误。
或者不会因为某人的原因而折叠。
错误内容如下。
“运行时错误”-2147212093(800424c3)'发生未知错误: ···@“
'In the References that you check the "Windows Host Script Object Model"
'In the References "Adobe Illustrator 10.0 Type Library" be checked
Option Explicit
Sub test1 ()
Dim path As String: path = "C: \ test.eps"
Call IllustratorController.PrintOut (path)
End Sub
我想打印'指定的插图文件
Public Sub PrintOut (ByVal filePath As String)
Open the 'illustrator (illustrator does not appear in front of you do not use the WSH)
Dim wsh As New WshShell
Call wsh.Run (filePath, 3)
I open the 'illustrations
Dim aiAppRef As New Illustrator.Application
Dim aiDocRef As Illustrator.Document: Set aiDocRef = aiAppRef.Open (filePath)
I want to print a 'document
Call aiDocRef.PrintOut
End Sub