5 Replies Latest reply on May 9, 2014 3:02 AM by Jump_Over

    Search and replace inside InDesign file

    mbrogdon

      I need to search and replace text inside InDesign files.

       

      Specifically, I need to change the path to all images in the current document from one path to another.

       

      While I can find many examples of relinking, I don't think relinking is what I need to do.  I need to change the path regardless of whether or not the files exist in either the original or new locations.

       

      Relinking seems to make no changes.

       

      I know this is possible as I used to have a script to do this, but I've lost the script.

       

      Any ideas out there?

       

      Thanks!

        • 2. Re: Search and replace inside InDesign file
          Jump_Over Level 5

          mbrogdon wrote:

          ... I need to change the path regardless of whether or not the files exist in either the original or new locations....

           

          No way to place (or relink to) a non-existing file.

          You can do it with an existing file and remove it or change its location after all.

          But why to do it?

           

          ...Any ideas out there...

           

          Find a lost script and share it here.

           

          Jarek

          • 3. Re: Search and replace inside InDesign file
            Laubender Adobe Community Professional & MVP

            Jarek wrote:

            No way to place (or relink to) a non-existing file.

             

            @Jarek – basically yes. This is true.

             

            What can be done however: linking to a dummy file (a duplicate of a dummy file, named like the real file, the missing one, positioned in the right directory), then change the location of the dummy file and afterwards remove the file.

             

            Are there some problems in this plan?

            Of course, if you have lost PSDs or AIs with various clipping paths and layers turned on or off. Placed PDFs should give you trouble too, if they are placed in various ways: single pages out of a PDF with multiple pages; TrimBox, BleedBox, MediaBox information comes to my mind (importedPageCropOptions).

             

            Simple images like JPGs should work. If they have no applied clipping paths.

             

            However funny to think about that…

             

            Uwe

            • 4. Re: Search and replace inside InDesign file
              mbrogdon Level 1

              Thanks for all of the replies.

               

              This situation is that the company I work for has decided to consolidate some of the duties of our graphics departments.  People in one location will be dummying documents for people at another location.

               

              The paths to the images are UNC paths, which means they're pointing to different shares on different servers.  This cannot be changed.

               

              Also, the images at either location may not exist until days after the dumming process.

               

              During the dummying process, the application that's used to build the pages places empty ad boxes (placeholders) on the page.  The placeholders are text frames.

               

              I don't understand in what way, but the paths to the images are hidden inside the InDesign file.  From the users' standpoint, the placeholders simply display basic information about the ad (customer name, ad number, etc.) and hold the position for the images that will be placed later.

               

              It is not using script labels to apply the paths.

               

              So, this is why I describe the problem as needing to do a search and replace inside the InDesign file.

               

              As I mentioned before, I know this is doable.  I think I now see that the problem problem is figuring out how these hidden paths are being applied in the document.  My only thought was script labels, but this is not the case...

              • 5. Re: Search and replace inside InDesign file
                Jump_Over Level 5

                Hi,

                Maybe a better solution is to "load & execute" instead of "find & replace".

                I mean one script is loading proper data while dummying proccess and another script is executing this when 'virtual' paths became 'real'.

                 

                Jarek