3 Replies Latest reply on Jul 17, 2008 12:18 PM by (bstimpson)

    [CS3 / VBS]  Search in CS3

      I have another old script I'm updating for CS3. This one uses the "Search" function and CS3 doesn't like it, what would be my best option to replace this line with since I'm not having very good luck with it?

      If TextFrame.Tables.Item(1).Cells.Item(CellCounter).Characters.Count > 0 Then
      TextFrame.Tables.Item(1).Cells.Item(CellCounter).Search vbCr, False, False, " "
      End If

      Thanks in advance!
        • 1. Re: [CS3 / VBS]  Search in CS3
          Level 1
          Nevermind....Answered my own question.
          • 2. Re: [CS3 / VBS]  Search in CS3
            Level 1
            Hi bstimpson,

            Try something like this:

            Rem Given a reference to InDesign "myInDesign"...
            Rem Clear the find text preferences
            myInDesign.FindTextPreferences = idNothingEnum.idNothing
            Rem Clear the change text preferences
            myInDesign.ChangeTextPreferences = idNothingEnum.idNothing
            Rem Set the "find what" property to a return
            Rem (using the InDesign metacharacter).
            myInDesign.FindTextPreferences.FindWhat = "^p"
            Rem Set the "change to" property to a space.
            myInDesign.ChangeTextPreferences.ChangeTo = " "
            Rem Do the find/change operation.
            Rem Reset the find/change preferences
            myInDesign.FindTextPreferences = idNothingEnum.idNothing
            myInDesign.ChangeTextPreferences = idNothingEnum.idNothing


            • 3. Re: [CS3 / VBS]  Search in CS3
              Level 1
              Thanks for the help. It works with the Find/ChangeTextPreferences. I should have paid more attention to the Adobe Scripting Guide!