I have a example Add ins of excel: I call object InDesign as:
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
Show Error 13: Type mismatch
at Set myInDesign = CreateObject("InDesign.Application")
Why? how fix? Thanks all.