0 Replies Latest reply on Jul 21, 2008 8:46 AM by ekimber

    [CS3 JS] How To Create Hyperlinks In InCopy?

    ekimber Level 1
      I have a client that wants to be able to author hyperlinks in InCopy, both links to named targets as well as links to URLs.

      It appears that the InCopy scripting object model does not include the hyperlink-related objects from the InDesign model, even those those objects can be found in an INCX document if a link is created within an InCopy article within InDesign.

      I'm trying to figure out what the best/quickest solution is given that I can't do it using scripting. I have already implemented a hyperlink creation dialog that emulates the InDesign New Hyperlink dialog.

      Unfortunately, I cannot assume or require that the InCopy users have InDesign installed. If I did I could just create a temporary InDesign doc that linked the InCopy article, create the link there, then save and update the InCopy article.

      Given that, I'm not sure how best to go about this.

      The ideas I've come up with so far are:

      1. Don't create real hyperlinks but use Note objects to capture the hyperlink source and target information. This would satisfy the client's requirement to be able to transform the links on conversion of the InCopy data to XML but wouldn't result in working InDesign hyperlinks.

      2. Modify the INCX document directly to add the appropriate hyperlink objects then reload it as part of the hyperlink creation process. Ugly but should work.

      3. Use XML markup in InCopy to represent the hyperlinks. I don't like this as much as the Note option because it's less obvious to authors what's going on and is easier for authors to mess up accidentally when they are editing.

      4. Implement a full-on InCopy plugin. This is really beyond my current capabilities and the scope of the project.

      5. Log a bug against InCopy to request that the hyperlink objects be added to the API. (Probably not going to give me a result in the time I need, even if it's an appropriate thing to do.)

      6. ???

      Is there some trick or back-door mechanism I've missed that I can use through InCopy scripting?

      Thanks,

      Eliot Kimber
      Really Strategies, Inc.