How to access indesign cs3 document through VC++

Hello
i am new to VC++, i need to communiacte Indesign CS3 through VC++, for this what can i do? inorder to access indesign docuemnts,
i also need to access a Third party API for CS3 through VC++, for the two puproses, i dont have any idea, so
kindly help me
with regards,
ram

Hi ram<br /><br />As Olav has pointed out, you need to decide whether to use COM or SDK.<br /><br />SDK is hard core - and I really mean HARD CORE. I consider myself to be a reasonably good VC++ programmer, but when I tried to develop an InDesign plug-in using SDK and VC++ I was completely lost.<br /><br />However it is possible to use VC++ to control InDesign via the COM object.<br /><br />Here is what you should do:<br /><br />1) Make a new VC++ project (MFC, MFC Application)<br />2) In Wizard dialog select Dialog Based and leave everything else unchanged (simply press Next)<br />3) You now have a simple empty dialog with 2 buttons<br />4) Double-click the OK button<br />5) Insert the following code (before OnOK()):<br /><br />// COM support required for this<br />//  Call CoInitialize() to initialize the COM library on the current thread<br />if(::CoInitialize(NULL) != S_OK) return;<br /><br />// Create instance of InDesign Application<br />InDesign::_ApplicationPtr app;<br />// Use the appropriate version here<br />//  This string will be used to search the registry for the application<br />//  associated with it and the same is invoked. <br />//  If you have different builds of the same version and you want to work<br />//  with a specific build, call CreateProcess() for that build and then<br />//  call CreateInstance() so that the currently running instance is returned.<br />app.CreateInstance(L"InDesign.Application.CS3");<br /><br />// Open existing document<br />InDesign::DocumentPtr doc = app->Open("C:\\InDesign\\myDocument.indd", true);<br />InDesign::PagePtr page = doc->Pages->FirstItem();<br />InDesign::TextFramePtr textFrame = doc->TextFrames->FirstItem();<br />textFrame->Contents = "Hello world";<br /><br />6) Go to the start of the file<br />7) Insert the following code before // CAboutDlg dialog used for App About<br /><br />// Required for calling COM initialization methods<br />#include <objbase.h><br /><br />// Import InDesign's Type Library<br />#import "C:\Documents and Settings\All Users\Application Data\Adobe\InDesign\Version 5.0\Scripting Support\5.0\Resources for Visual Basic.tlb"<br /><br />8} Build and run the project (F5). When you press OK, InDesign should launch, open your document, find the first page, find the first TextFrame and replace the text (contents) with "Hello world"<br /><br />How to get in contact with your third-party API is a completely different ball game (not in the scope of this forum), but at least you now have a VC++ project with header files etc.<br /><br />If your third-party API is indeed an InDesign plug-in, I totally agree with Olav that you have to direct your questions to the SDK forum.<br /><br />Best regards,<br />Bo

Similar Messages

  • Opening InDesign CS3 documents in CS4

    I am hoping someone from Adobe can help me with this question. Here is the scenario:
    I work on the support team in a prepress environment where we get hundreds of client supplied InDesign files weekly. Some clients supply their files in InDesign CS3 and some supply the files in InDesign CS4. We have both applications.
    From our experience, we have found that if we open a InDesign CS3 document using InDesign CS4, there is a potential for items to disappear in the document. I don't know what changed from 3 to 4 to cause this problem. This has happened to us more than one time and we have experienced money losses due to on press errors.
    One would say, as we have, if the document is supplied in InDesign CS3, work on it in InDesign CS3. Easy enough, right?
    Well, not really. If you have CS3 and CS4 both installed on your mac at the same time, simply double-clicking on the file will default to CS4 (since it is newer).
    We have told our operators that they need to identify what version the file was created in; which is not the easiest thing either.
    If you "get info" on the file, you do not get accurate information. It may say "CS4", even if it is "CS3", I think this is because your system is reading what the newest application that you have install is.
    I have found that by dragging the file over the CS3 icon in the doc, it will attempt to open the file in CS3 and if it truly is a CS4 document, you will get plugin errors and the file won't open. This works, but my 38 mac operators are so used to just double-clicking a file to open it, they sometimes forget to do it my way, and thats when we get errors.
    Is there a plugin available that would prompt you, when double -clicking on a file as to what version it is, or what version InDesign that you would like to open the file in?
    What did Adobe change in InDesign CS4 that would cause items to disappear or change when working on CS3 documents in CS4?
    Thank you in advance.

    First, this is a user forum, not an official Adobe support site, so you aren't talking to Adobe employees for the most part.
    Second, though it is subtle, there is a visible difference between the icons for file created in CS3 and CS4, but you do need to look.
    There is (or perhaps it's now "was") a known issue with master items disappearing when placing one ID file into another in CS4. Be sure your copies are updated to the latest patch. Another reason to avoid opening CS3 files in CS4 is potential differences in text flow due to text engine differences which will affect how lines break.
    If you want to train your people in a hurry, tell them the next time you have to re-run a job because they opened it in the wrong version you'll deduct the cost from their pay.
    Peter

  • Export a Indesign(CS3)  Document as PDF(Windows)

    Hi,
    I am beginner in Indesign Plugin development.
    I want to export a Indesign CS3 document as PDF programmatically. I
    know that we need to use IPDFExportPrefs and set the various
    attributes.I dont know proper code.
    Can anybody give the code to implement it.
    Or any reference to find it.
    Thanks,
    Ravi sharma

    Arthur,
    You can't export the document directly to HTML, but you can use the Cross-Media Export to make and XHTML file for Dreamweaver (or other editor). It will generate an HTML page and a blank CSS style sheet, as well as gathering the images, but web and print are entirely different formats so you won't have anything resembling your ID doc when you get through, as far as layout is concerned. If you want people to see your layout as is, you need to use PDF. Try changing the compression settings for the export to bring the size down, but it will be a compromise somewhere most likely.
    Peter

  • Disabling Secondary Popup When Accessing Office 2003 Documents Through KM

    Hi,
    we have the old problem with "Disabling Secondary Popup When Accessing Office 2003 Documents Through KM" which was topic of a weblog by John Mittendof already.
    For us it was solved when using Windows-integrated authentication without changing the registry as described.
    This works with Office2003 SP1. With SP2 the popup appears again.
    Does anyone have the same problem???
    The disadvantage with the registry solution is, that the files will be stored in the temporary internetfiles which leads to a message when opening a second time (in the sense of: document already open by "myself" - open writeprotected?).
    Best Regards
    Helge Stührmann

    Please Try this: (You should change all these settings or you'll get other errors)
    Go to Content Management ® Global Services ® URL Generator Service.
    Make the following changes:
    &#9679;      a) Replace the prefix
    /irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs in the parameters Image Path, Viewer, XML Forms CSS URL, and Content Access Path with /irj/go/km/docs
    The entry in the Image Path parameter must look as follows: /irj/go/km/docs/etc/public/mimes/images
    &#9679;      b) Replace the prefix
    /irj/servlet/prt/portal/prtroot/com.sap.km.cm.uidetails in the parameters Resource Properties Page and New Resource Properties Page with /irj/go/km/details
    &#9679;      c) Replace the prefix
    /irj/servlet/prt/portal/prtroot/com.sap.km.cm.navigation in the parameters Explorer Servlet and Navigation Servlet with /irj/go/km/navigation
    &#9679;      d) Replace
    /irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent in the parameters Highlighted Content with /irj/go/km/highlightedcontent
    &#9679;      e) Replace
    /irj/servlet/prt/portal/prtroot/com.sap.km.cm.basicsearch in the parameter Basic Search Servlet with /irj/go/km/basicsearch
    Regards, Fede

  • How to access the LOB objects through databaselinks?

    How to access the LOB objects through databaselinks?

    Abhii wrote:
    How to access the LOB objects through databaselinks?You can refer to this link
    http://dbaforums.org/oracle/index.php?showtopic=4790
    I've found it by simple google-ing...
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to access the LOB objects through database links??????????????

    How to access the LOB objects through database links??????????????

    Hi
    See:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:52297289480186
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5322964030684
    And you also might want to get a new keyboard, your '?' seems to be stucked....

  • How can i send a document through my email with a ipod touch 2nd generation?

    How can i send a document through my email with a ipod touch 2nd generation?

    https://itunes.apple.com/us/app/id314894105?mt=8
    https://itunes.apple.com/us/app/id306273816?mt=8
    They have some limitations though. They have paid versions that remove those limitations

  • How can I find the total word count in my entire Indesign CS3 document?

    I have a book that consists of 10 different files and many many different text boxes. I need to find out what the total word count is for the entire book. Is there a simple way to do this, or do I have to copy and paste all the text from InD into a word file to get the number? Your help is much appreciated.

    This AppleScript will get the total word counts of a folder of ID files—it shouldn't be too hard to convert to JavaScript if you are not using OSX:
    tell application "Finder"
    activate
    set myFolder to choose folder with prompt "Select the folder containing the files to count"
    set myFiles to every file of folder myFolder whose file type is "IDd5"
    end tell
    tell application "Adobe InDesign CS3"
    set wordcounts to {}
    set total to 0
    repeat with j from 1 to (number of items in myFiles)
    open item j of myFiles
    tell active document
    tell every story
    set wordcounts to wordcounts & (count every word)
    end tell
    set totalstories to count every item of wordcounts
    repeat with i from 1 to totalstories
    set total to total + (item i of wordcounts)
    end repeat
    close
    end tell
    end repeat
    display dialog "The documents in the selected folder have a total of " & totalstories & " stories, and " & total & " words"
    end tell
    ========================================
    If you just want the active document's count it would be:
    tell application "Adobe InDesign CS3"
    tell active document
    set wordcounts to {}
    tell every story
    set wordcounts to wordcounts & (count every word)
    end tell
    set total to 0
    set totalstories to count every item of wordcounts
    repeat with i from 1 to totalstories
    set total to total + (item i of wordcounts)
    end repeat
    display dialog "Total words in all " & totalstories & " stories: " & total
    end tell
    end tell

  • How to access third party plugin through vc++ Programming

    Hi,
    i am new to vc++ and InDesign, i am using windows xp as OS and Indesign CS3 as version
    now my work is to access the Third Party plugin styles, the third Pary plugin is all about InMath, that is all for mathematical relations using inmath plugin styles, my work is to accessing the styles through programming by using a InMath header files,
    i tried to the best of myself, but i not get the solution,can u please give some thing usefull do this.
    is it possible to access third party plugin through VC++ prgramming usign a single header file??
    regards,
    ram

    Hi,
    Can anyone please help me to accesss InMath styles in InDesign SDK using VC++ Programming.
    Thanks
    Saravanan

  • How to learn Indesign CS3  SDK programming for windows

    Hi,<br /><br />I am very new to plugin development.I am working in Indesign CS3 SDK (windows).<br /><br />But I am not able to write /understand the syntax of InterfacePtr.<br /><br />for eg :<br /><br />InterfacePtr<IClassIDData> orgDocFileHandlerData(doc, IID_ORGICLASSIDDATA); <br /><br />We get Pointer of any Interface , and pass some arguments .<br /><br />So can anybody help how to learn this programming , I am not finding any <br /><br />books or tutorials on this so that I can read from the basic. I have only <br /><br />referred to Programming Guide(CS3). Can anybody please help/explain  me how <br /><br />to learn it?<br /><br />Thanks.<br /><br />Ravi Sharma

    It's only my way of understanding about InDesign SDK :<br /><br />* SDK objects are know as 'boss(es)' and are accessed thru interfaces.<br />* You can imagine object as collection of interfaces. And you can even aggregate new interfaces to existing objects.<br />* When you have a reference to an interface of a boss, you can access other interfaces (of the same boss - or object) using the *amazing* syntax : (here, doc is a probably an IDocument interface on a kDocBoss object, and you want to access it's IClassIDData interface)<br />InterfacePtr<IClassIDData> orgDocFileHandlerData(doc, IID_ORGICLASSIDDATA); <br />* And finally, InterfacePtr has a reference counter, which allows the framework to destroy the interface object - not the boss of course, only the memory used by the object - when it's non mre referenced.<br /><br />HTH !

  • How to access all open documents' ReadImageDocumentDesc?

    Hi everyone,
    I want to get access to the ReadImageDocumentDesc for all currently opened documents from an Export plugin, so I can give users the choice which of the documents to export. Is this possible?
    I expected to have access to all documents via the "next" field of "ReadImageDocumentDesc *documentInfo" in form of a linked list, but that field appears ti be always NULL. Or isn't it for certain types of plugins?
    If it isn't possible, are there other tricks I could use to accomplish my goal? Is a stack renderer plugin an option perhaps?
    Any kind of help is highly appreciated.
    Bernd

    I have the same question. When I write a filter plugin in, I try to access two open pictures to deal with both of them. But I can't find how to utilize the ReadImageDocumentDesc * next to finish it. Is it possible?

  • How To Access Photoshop CS3 Crash Log

    How do I access Photoshop CS3 Crash Logs?

    Open Console and then, if the toolbar is not visible, choose *View > Show Toolbar*.
    Press the Logs button and then navigate to ~/Library/Logs > CrashReporter or /Library/Logs > Crash Reporter and choose the Photoshop report.

  • How to access the XDB-Repository through iAS

    It is easy to access the XDB repository on a database server directly using http or ftp.
    However, since our database server is behind a firewall we need to access the XDB repository through our Oracle Internet application server (iAS 9i) which is situated outside the firewall. Does anyone know how to do this? Any hint is greatly appreciated; unfortunately nobody answers to this question in the iAS forum.
    We access a PSP-application on the database-server through the iAS-server using a DAD defined on the IAS-server. The XDB repository probably needs another access proceeding.
    Our environement:
    iAS 9.2 (Solaris)
    Oracle 9.2.0.4 (Solaris)
    Thank you very much for any help
    Dirk Schmatz

    Hi there,
    This question is exactly what I would like to ask. Can someone answer this question please!!!
    Regards,
    SIM

  • How to create shipment cost document through BAPI?

    Hi SAP Guru,
    My requirement is to create shipment cost document through BAPI.
    Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
    Thanks & Regards,
    Pankaj Sinha

    Hi Pankaj,
    See the following link for more help.
    IDOC/BAPI for changing Shipment cost number/document
    Regards

  • How to run Indesign CS3 as a Service with Port number

    Hello all,
    I would like to run the InDesign CS3 Server as a service on Windows. It seems that after installing the Server it automatically installs as a service. But where can I assign the port number. If under Services properties of InDesign Server under Parameters I mention -port 1050 on Ok button it removes the parameter information.
    I am doing right or is there some other way to start the Server as Service with Port number.
    Thank you all in advance.
    Regards
    Farzana.

    Hi Sascha,
    have you tried to remove the service and install it manually?
    \"Path to IDS"\InDesignServerService /install /u
    \"Path to IDS"\InDesignServerService /install
    I guess you've tried to start the instance in the console already (successfully?).
    Regards
    Ingo
    Am 05.07.2011 um 12:18 schrieb 1000grad_Sascha:
    Hi Ingo,
    I've installed the Snap-In and configured one instance. Maybe it's worth mentioning that there are some instances running at the same time, which have been started using the console. Hope that's not interfering. However, the MMC-configured instance uses a different port.
    I tried to start the service with a huge range of users having all imaginable privileges. The common way of using either "LocalService" or the Local System Account (which has admin rights for me) doesn't do the job.
    cheers,
    Sascha
    >

Maybe you are looking for

  • GUI_DOWNLOAD issue - returns empty table

    I am using the following to read a text file (I have tried a tab delimited text file as well as a .csv file) into an internal table.  The returned sy-subrc value is 0 but the returned table is empty. Any ideas? Regards, Davis d_string = p_file.   CAL

  • Can't highlight text in blue to edit

    My Pages has just started doing this recently. When I go to highlight text it only highlights in gray and not the usual blue. And of course it will not let me edit. Has any one seen this or have any idea what is causing this? I have an iMac running 1

  • RG1 not showing after consignment pick up

    Hi Gurus, We did the consignment Fill up on 16th feb and followed the delivery transaction with 631 movement type and on 16th Feb did performa invoice & excise invoice as well. We did not utilize the register and it is showing in J1I5 transaction wit

  • I was having difficulty establishing an ePrintcenter account.

    I had a previously establishe Snapfish account and reset that password since I couldn't remember it.  I then logged into ePrintcenter and it worked fine.  I got kicked out of ePrintcenter and can not log back in using the proper login information.  I

  • Accepting international invitations

    I just received a calendar invitation from a business colleague in Hong Kong and asked for my personal calendar in iCal to be cc'd.  My work calendar is outlook and it automatically adjusted the meeting to display the meeting 10:30pm NY.  My iPhone i