2 Replies Latest reply on Mar 22, 2008 1:49 AM by (TheRock)

    Problem with vbscript  idNothingEnum.idNothing

    Level 1
      Hi to ALL

      I use vbscript on windows xp sv.pack 2 with InDesign CS3 v.5.0.
      I need HELP.

      Today I have a problem with this script (that worked yesterday !!!).
      Seems that the script does not recognize more "idNothingEnum.idNothing".
      If I REM the two lines:
      myInDesign.FindTextPreferences = idNothingEnum.idNothing
      myInDesign.ChangeTextPreferences = idNothingEnum.idNothing
      the script work.

      REM SCRIPT
      FileIndd= "C:\test.indd"

      Set myInDesign = CreateObject("InDesign.Application.CS3")
      Set myDocument = myInDesign.Open( FileIndd )

      ' Clear the find/change preferences.
      myInDesign.FindTextPreferences = idNothingEnum.idNothing
      myInDesign.ChangeTextPreferences = idNothingEnum.idNothing

      Rem Set the find options.
      myInDesign.FindChangeTextOptions.CaseSensitive = True
      myInDesign.FindChangeTextOptions.IncludeFootnotes = False
      myInDesign.FindChangeTextOptions.IncludeHiddenLayers = False
      myInDesign.FindChangeTextOptions.IncludeLockedLayersForFind = False
      myInDesign.FindChangeTextOptions.IncludeLockedStoriesForFind = False
      myInDesign.FindChangeTextOptions.IncludeMasterPages = False
      myInDesign.FindChangeTextOptions.WholeWord = True

      source= "40XPK"
      dest= "-40XPK-"
      myInDesign.findTextPreferences.findWhat = source
      myInDesign.changeTextPreferences.changeTo = dest
      myInDesign.changeText()