5 Replies Latest reply on May 17, 2012 3:12 AM by Bill joy

    How create Indesign application using vc++

    Bill joy Level 1


      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++.


      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++.



        • 1. Re: How create Indesign application using vc++
          Manan Joshi Level 4

          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.




          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


          • 2. Re: How create Indesign application using vc++
            Bill joy Level 1

            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



            • 3. Re: How create Indesign application using vc++
              Manan Joshi Level 4

              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.



              • 4. Re: How create Indesign application using vc++
                Bill joy Level 1

                Hi Manan

                I already serch Resources for Visual Basic.tlb on my system in all file and folder

                There is no such file exist on my system

                I am not understand how get .tlb file to solve my problem.

                I think Community Member   Ramanathan.ct have solution of my problem

                How contact this member any way plz tell me

                Plz give me any idea to solve my problem.



                • 5. Re: How create Indesign application using vc++
                  Bill joy Level 1

                  Hi Manan

                  I have create Visual Basic.h and Visual Basic.cpp using Resources for Visual Basic.tlb


                  Now I want to ask that i am not found default value of any parameter

                  for example in expot()

                  objDoc.Export(idExportFormat.idJPG, cstrOutputFile, false, application.PDFExportPresets["Press"], object VersionComments, bool ForceSave);

                  What is Default value of object VersionComments

                  and what value of  Object Using in case of JPEG export.