3 Replies Latest reply on Nov 12, 2014 7:06 AM by David M James

    Automation of hyperlink creation for imported text?

    David M James Level 1

      I am using InDesign CS4 on a PC.

      I am creating InDesign documents by importing XML files.  When the XML is imported the tags are mapped to paragraph and character styles in InDesign so that the text is formatted as required.  The file is then exported to PDF.  I am currently adding links in the PDF file so that readers can jump to other parts of the document (or sometimes other documents) easily.


      I would like to be able to automate the creation of hyperlinks within an InDesign document rather than having to manually create them each time which is time consuming (in InDesign or Acrobat).  I have trawled the forums often and it seems to be a popular request.  Replies have suggested using scripting but this seems to be incredibly complicated (especially as most InDesign users are not programmers).


      Obviously the ability to automatically create hyperlinks is included in the InDesign software - the creation of a table of contents is proof of this.  Could some degree of automatic hyperlink creation not be done by making a character style become a hyperlink and a paragraph style be a hyperlink destination?  Something similar to this must happen in the table of contents creation.


      If the 'create hyperlink' option were added to the character style options and 'create hyperlink destination' option added to the paragraph style options intra document links could be established automatically.


      Can anyone help me out with this?

      Maybe this function is included in a later version of InDesign or maybe Adobe would like to consider it.



        • 1. Re: Automation of hyperlink creation for imported text?
          Steve Werner Adobe Community Professional & MVP

          It wouldn't be automatic.


          You probably would need to use scripting. If you're not a scripter, ask in the InDesign Scripting forum:


          InDesign Scripting

          • 2. Re: Automation of hyperlink creation for imported text?
            TᴀW Adobe Community Professional & MVP

            Can you give an example of the sort of hyperlinks you're trying to create?


            Is it clickable page references you're looking for? If it is, try this:



            Or maybe this: http://www.id-extras.com/products/livetoc

            • 3. Re: Automation of hyperlink creation for imported text?
              David M James Level 1

              Hi Ariel


              There are two types of link: firstly, a cross reference type link to a section within the same document; the other is a hyperlink to another document.  With the cross reference the destination is nearly always a title of a section within the same document.  The hyperlink will always point to another file.


              I use a character style to indicate that a link is present (by applying a different colour to the text).  I can create this by tagging the text in the XML file - a colour will be applied to the tagged text by mapping the XML tag with the InDesign character style when it is brought into the InDesign file.  I then have to select the coloured text in InDesign and apply a hyperlink to it and point it to a pre-determined destination.


              This can be quite time consuming if there are a lot of links.  Therefore it would be nice if, when I apply a character style, it automatically assigned a hyperlink to the text with that character style.  Similarly, if titles (as defined by anything using a particular paragraph style) were automatically assigned as being 'hyperlink destinations' the links could be made automatically (assuming that I was careful to use the same text string for each end of the link and that a text anchor was created by default).  It would be like having further 'table of contents' type links within the document.


              I would love to be able to do this by using attributes within the XML file but it is not possible.  At least I can automate the highlight colour of a 'live' piece of text by tagging the XML.  If only I could get InDesign to automatically apply a hyperlink to it ...


              The links you provided are interesting but not quite what I am looking for.