2 Replies Latest reply on Sep 1, 2008 5:46 AM by (Robert_Tkaczyk)

    Converting a script from CS3 to CS2

      So far, I've successfully converted a CS3 vbscript to be run in CS2... there's one thing where i got stuck though...

      How do you convert this:

      myInDesign.FindPreferences = InDesign.idNothingEnum.idNothing
      myInDesign.FindPreferences.AppliedCharacterStyle = myCharacterStyle
      Set myFoundItems = myDocument.FindText(True)
      If myFoundItems.Count > 0 Then

      To CS2?

      I know I should be using

      myDocument.Search(...)

      But I dont know what parameters to use... I didnt find a detailed reference, but i'm still looking.

      Thanks
        • 1. Re: Converting a script from CS3 to CS2
          Level 1
          Function Search([For], [WholeWord], [CaseSensitive], [ReplacingWith]) As Objects
          Member of InDesign.Text
          Look for occurrences of text that matches specific criteria /
          Return value: The found or replaced text /
          For: What to look for as String /
          WholeWord: If true, then disregard text embedded within a larger word as Boolean /
          CaseSensitive: If true, then search only for text that matches case as Boolean /
          ReplacingWith: What to replace the found text with, either a string or a special character as String

          but you also need to set Find/Change text options/preferences

          http://kb.adobe.com/selfservice/viewContent.do?externalId=333598
          here you can find info about location of PDF with Scripting Guide for ID CS2

          robin

          --
          www.adobescripts.com
          • 2. Re: Converting a script from CS3 to CS2
            Level 1
            ... and link to online VBS scripting reference for ID CS2:

            http://www.indesignscriptingreference.com/

            robin

            --
            www.adobescripts.com