5 Replies Latest reply on Aug 11, 2017 12:33 AM by Laubender

    Text replace with an ampersand "&" 2015 indesign script


      I am having an issue, that I really need to fix with my indesign script. Anytime I have an "&" in my changeTo string, the script is messing up, and replacing the text with an empty string. Do I need to do some sort of escape for the ampersand? I don't need to if I am not using a script, plus the ampersand is with quotes, so I am not understanding why this is breaking.


      Any help would be GREATLY appreciated.



          app.findTextPreferences = NothingEnum.NOTHING;
          app.changeTextPreferences = NothingEnum.NOTHING;
          app.findChangeTextOptions.caseSensitive = true;
          app.findChangeTextOptions.includeFootnotes = false;
          app.findChangeTextOptions.includeHiddenLayers = false;
          app.findChangeTextOptions.includeLockedLayersForFind = false;
          app.findChangeTextOptions.includeLockedStoriesForFind = false;
          app.findChangeTextOptions.includeMasterPages = false;
          app.findChangeTextOptions.wholeWord = false;
          app.findTextPreferences.findWhat = "line 1";
          app.changeTextPreferences.changeTo = "R&T";