Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Multiple Find Replace – ID (CS5)

Return to Member Forum

  • Author
    Posts
    • #62243
      erickp
      Member

      I have a document with various tables that contain part numbers and descriptions. Various part numbers have changed and it will be easy to change them with a simple find & replace but I have a list of 150 parts that have been changed. Is there a way to enter all the multiple parts in the “find what” field and then add the correct parts to replace them in the “change to” field?

      A loose example would be….

      Find what:

      CV-BNC1N

      CV-BNC2N

      CV-BNC4N

      CV-BNC6N

      CV-BNC8N

      CV-BNC10N

      CV-BNC12N

      CV-BNC13N

      Change to:

      BEL-1505ABHDL

      BEL-1506ABHDL

      BEL-1694ABHDL

      BEL-1695ABHDL

      BEL-1855ABHDL

      BEL-179DTBHDL

      BEL-1505ABHD1

      BEL-1506ABHD1

      The first “find what”, refers to the first “change to” and so on. Any help is appreciated. Thank you!

      ~Erick

    • #62249
      Anonymous
      Inactive

      Hi,

      FindChangeByList is what you're after. It's a script bundled with InDesign. You can find it from within InDesign:

      Window > Utilities > Scripts > Application > Samples > Applescript > FindChangeByList.applescript

      Just underneath is a folder with the support file. It's a text file that you edit to tell the script what to find and what to change it to.

      Right click on that folder and reveal in finder. Duplicate the FindChangeList.txt file so you always have an original.

      Now you simply alter what's at the very bottom of the file after the double hyphen that follows this wording:

      –All InDesign search metacharacters are allowed in the “find what” and “change to” properties.

      (FROM THIS POINT ON)

      If you copy and paste all that text (after that last double hypen) into Excel, you can then chop it apart to create the following:

      Column A

      text

      Column B

      {find what:”

      Column C

      (Blank at the moment because it will contain your find query)

      Column D

      “}

      Column E

      {change to:”

      Column F

      (Blank at the moment because it will contain your change to query)

      Column G

      “}

      Column H

      {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false}

      Column I

      Changes the code

      Now duplicate the first row down 150 times. Paste your list of 150 Find codes into column C. Paste your list of 150 Change codes into column F.

      Now copy and paste all 150 rows into the FindChangeList.txt file, replacing the original find/change queries after that double hyphen.

      To finish off, find ” (a quote followed by a tab), and replace with a single quote mark ” without any spaces or tabs around it.

      Finally search for ” (tab followed by a quote), and replace with a single quote mark ” without any spaces or tabs around it.

      Save your text file.

      Go to InDesign and double-click FindChangeByList.applescript

      In theory, all your codes should now be updated.

    • #62305
      erickp
      Member

      Interesting. I'll have to give it a go, when I get a chance. Need to finish current project and then I'll play around and report back.

      Thanks for your help!!

    • #63585
      artstar
      Participant

      I am doing multiple find/replace with the FindChangeByList script.

      How can I search “Any character that is not a word character” or at least the “quotes”

      I am doing a lot of search replace with the FindChangeByList script, but a word with “quotes” doesn't work, for example I want to put “design” of the word indesign between qoutes:
      text {findWhat:”indesignsecrects”} {changeTo:”in”design”secrets”}

      Probably because it gets confused with the other quotes.

    • #90032
      Nicki Muylst
      Member

      Hi,

      I’m trying to make this work with

      text {find what:”word 1″} {change to:”word 2″}{include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find all Changes the code.

      I have an excel file with al the information.

      word 1 column A and word 2 column B

      I already downgraded to indesign 2014.
      But it don’t work.

      Can you give me an example .txt file

      Thank you in advance.

Viewing 4 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads