4 Replies Latest reply on Jul 18, 2013 7:07 PM by erieru103

    Search cross reference marker

    erieru103 Level 1

      Hi.

       

      Can someone tell me how to search cross reference markers in a InDesign document?

       

      Miya

        • 1. Re: Search cross reference marker
          Peter Kahrel Adobe Community Professional & MVP

          You can't look for them using findGrep() or findText(). Cross-references are instances of hex value 0018, but that's used for other things too soo it's not safe to look for 0018. What you can do is collect all the document's crossReferenceSources and use their sourceText property to get their location in a story.

           

          Peter

          1 person found this helpful
          • 2. Re: Search cross reference marker
            erieru103 Level 1

            Hi, Peter.

            Thank you for your reply.

             

            What I want to do is showing the cross reference markers's location to user.

            I gived up to search the cross reference markers now.

            I am using hyperlink.showDestination() to get the markers's location.

            But, it doesn't work when the destination is in other document.

            Run-time error occured and it said that "Method 'ShowDestination' of object 'Hyperlink' failed".

            (I am using VBScript)

            I tried to set the document which the cross reference markers are in to active before carrying out hyperlink.showDestination().

            It also failed.

            I have no idea about this error.

            So... if you know, can you tell me what should I do for the error?

            • 3. Re: Search cross reference marker
              Peter Kahrel Adobe Community Professional & MVP

              First you need to find the hyperlink associated with the cross-reference (which you already did, I think). It's true that you can't use hyperlink.showDestination(), but you can use this:

               

              myDoc.myHyperlink.destination.showDestination()

               

              (adjusted for VBScript capitalisation).

              • 4. Re: Search cross reference marker
                erieru103 Level 1

                Hi, Peter.

                Tnank you for your reply.

                 

                I tried to use myDoc.myHyperlink.destination.showDestination() and

                it works well.

                 

                Thank you very mach.