我有一个示例添加excel的内容: 我将对象InDesign称为:
Private Sub btnStart_Click()
Dim pCnt As Integer
Dim myInDesign As InDesign.Application
Dim myDoc As InDesign.Document
Dim myPage As InDesign.Page
ActiveWorkbook.Colors(17) = RGB(255, 204, 255)
Set myInDesign = CreateObject("InDesign.Application")
Set myDoc = myInDesign.ActiveDocument
Set myInDesign = Nothing
Set myDoc = Nothing
Unload Me
End Sub
在Error 13: Type mismatch
Set myInDesign = CreateObject("InDesign.Application")
为什么呢?如何解决?谢谢大家。
答案 0 :(得分:1)
我在http://forums.adobe.com/thread/834780
找到答案删除文件C:\ ProgramData \ Adobe \ InDesign \ Version 6.0 \ en_US \ Scripting Support \ 6.0 \ Resources for Visual Basic.tlb 并使用权限admin运行excel和indesign