Skip to main content
May 16, 2012
Answered

How create Indesign application using vc++

  • May 16, 2012
  • 11 replies
  • 4809 views

Hi

I want to ask  that How create Indesign application using vc++ ?

I am able to develop application in C# using COM and generate Interop.Indesign.dll using Adobe Indesign CS5.5 Type Library

I am sucessfully create Indesign instance using this code

Type type = Type.GetTypeFromProgID("InDesign.Application");

InDesign._Application application = (InDesign._Application)Activator.CreateInstance(type);

I am not understand how use COM with vc++ or there is another method to create Indesign instance using vc++.

or

How use Interop.Indesign.dll in vc++ to create indesign instance.

There is no .tlb file in indesign directory by which i generate .h and .cpp file that i can use in my project.

I want to create Indesign in vc++.

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Manan Joshi

Hi i am not a VC++ programmer per se so cannot give you the code, but i can give some general steps which can get you going and hopefully solve your problem.

We can use the Indesign COM object to drive Indesign and its functionlaity from VC++ or C# and the like. What we need to do is import the tlb files in our project so that we have the declerations of the methods exposed by the Indesign's COM interface and make a call to them.

The .tlb file is present at "C:\ProgramData\Adobe\InDesign\Version 7.0\en_US\Scripting Support\7.0\Resources for Visual Basic.tlb". You can use this to create your .h files using the #import statement.

Once you have the .h created i think you will be able to call the Indesign methods, of course you will have to create an instance of the Indesign application.

Some links that could be of help to you are.

http://forums.adobe.com/message/3783210#3783210

http://forums.adobe.com/message/4407895#4407895

Have a look they discuss the issue you are facing.

P.S.: The .tlb file exists at multiple locations in your system so to be sure that you are using the latest tlb. Search for "Resources for Visual Basic.tlb", rename it and then launch Indesign(it should recreate these files which will have the latest object model). On Win7 launch Indesign using Admin privelages else thes file won't be created.

Manan Joshi

  - Efficient InDesign Solutions -

MetaDesign Solutions

http://metadesignsolutions.com/services/indesign-development.php

11 replies

Manan JoshiCommunity ExpertCorrect answer
Community Expert
May 16, 2012

Hi i am not a VC++ programmer per se so cannot give you the code, but i can give some general steps which can get you going and hopefully solve your problem.

We can use the Indesign COM object to drive Indesign and its functionlaity from VC++ or C# and the like. What we need to do is import the tlb files in our project so that we have the declerations of the methods exposed by the Indesign's COM interface and make a call to them.

The .tlb file is present at "C:\ProgramData\Adobe\InDesign\Version 7.0\en_US\Scripting Support\7.0\Resources for Visual Basic.tlb". You can use this to create your .h files using the #import statement.

Once you have the .h created i think you will be able to call the Indesign methods, of course you will have to create an instance of the Indesign application.

Some links that could be of help to you are.

http://forums.adobe.com/message/3783210#3783210

http://forums.adobe.com/message/4407895#4407895

Have a look they discuss the issue you are facing.

P.S.: The .tlb file exists at multiple locations in your system so to be sure that you are using the latest tlb. Search for "Resources for Visual Basic.tlb", rename it and then launch Indesign(it should recreate these files which will have the latest object model). On Win7 launch Indesign using Admin privelages else thes file won't be created.

Manan Joshi

  - Efficient InDesign Solutions -

MetaDesign Solutions

http://metadesignsolutions.com/services/indesign-development.php

-Manan
May 16, 2012

Thanks Manan for Reply

I have CS5.5 on my system. There is no .tlb file exist on my system in indesign directory

My Indesign instalation path is C:\Program Files\Adobe\Adobe InDesign CS5.5

and file path is C:\Documents and Settings\Administrator\Application Data\Adobe\InDesign\Version 7.5\en_GB

at this path there are three folder 1)CompositeFont  2) Scripts 3)Workspaces

There is no Scripting Support folder and no Resources for Visual Basic.tlb file exist

How generate .tlb file plz tell me

If You have .tlb file plz send then i generate .h and .cpp file from this and use in my vc++ project

Thanks


Community Expert
May 16, 2012

Bill, You should have the file on your system. Try searching for the file name in the whole system. And Bill my .tlb file won't be any good for you as the list of plugins loaded by the Indesign on my machine maybe different from your machine.

And if you try to call methods exposed by any such plugin that exists on your machine and not mine then we are headed for a sure crash.

Manan

-Manan