我有一个 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")
为什么?如何修复?谢谢大家。