Skip to main content
daneJ
Inspiring
August 12, 2016
Answered

Cant access Indesign with Excel VBA

  • August 12, 2016
  • 1 reply
  • 2569 views

I cant set indesign as an object. here is my code:

Sub newbook()

Dim InDapp As New InDesign.Application

Set InDapp = CreateObject("InDesign.Application")

End Sub

I have tried adding a version number to the create object(.CC.2015, CC2015) and i have tried renaming the reference resource as recommended by Trevor. I have look all over the internet and look in the guide.

If anyone can help me getting start here i would really apprieciate it.

Thanks.

Dane

This topic has been closed for replies.
Correct answer Kasyan Servetsky

Make sure to add the InDesign's reference like so:

Without this the 2nd line throws an error both as VBA and VBS script.

— Kas

1 reply

Kasyan Servetsky
Kasyan ServetskyCorrect answer
Legend
August 15, 2016

Make sure to add the InDesign's reference like so:

Without this the 2nd line throws an error both as VBA and VBS script.

— Kas

daneJ
daneJAuthor
Inspiring
August 15, 2016

Hello Kas

Thank you for your reply.

I did add the indesign reference and it still gives the error.

for ("InDesign.Application") it say simple not supported

and for ("InDesign.Application.CC or .CC.2015 or .CC.2014") I get 'error 429 activex can not create this object'.

Dane

daneJ
daneJAuthor
Inspiring
August 15, 2016

Hi Dane,

Before posting my answer I tested your snippet with InDesign CC 2015.4 and Excel 2016 on Windows 10 and it worked for me without any errors.

— Kas


Hey Kas,

It appears i was in contact with InDesign and didnt know it. this is because the local winow at the bottom of the screen show me nothing at all. i have attached a picture.

I am somewhat used to scripting for illustrator and this local windows is full of all the classes, object, and elements that each variable/object contains. For InDesign there is nothing; the value is <no Variable>. If this is not normal then perhaps you know why?

Thank you very much for your help.

Best regards

Dane