2 Replies Latest reply on Jun 23, 2011 4:01 AM by jsanraj

    FindText Preference




      I have developed a script to find the objects using VBscript. In this by default paginator used to find the Find option for GREP mode to find footnotes. But while using script i have not used any GREP to find or to change. But the code automatically changes the ^F characters in the indd file. I need to overcome this error by making Find->Text mode as default.


      Please help me to achieve this.

        • 1. Re: FindText Preference
          Peter Kahrel Adobe Community Professional & MVP

          Make sure that the Change to field is empty. There may be a space lurking there.



          • 2. Re: FindText Preference
            jsanraj Level 1

            Hi Peter,


            Eventhough the Find option will search TEXT or GREP TAB in a single parse. I'm doing TEXT search but InDesign taken GREP search and delete unwanted texts.


            In my code, I only find text as we do in InDesign Application, Find/Change popup window (Edit->Find/Change->TEXT). But while running script, the previous find instance like Edit->Find/Change->GREP used by the operator remains in the Find/Change window itself. I need to change the mode to Edit->Find/Change->TEXT even the previous check is GREP mode and if there is any text in the findwhat textbox before evaluting the below code.

            I have pasted the part of the code below for CS3.


                myind.FindTextPreferences = idNothingEnum.idNothing
                myind.ChangeTextPreferences = idNothingEnum.idNothing
                Set myfind = myind.FindTextPreferences
                myfind.AppliedParagraphStyle = "footnotes"
                myfind.FindWhat = ""
                Set TextDocVar1 = mydoc.FindText
                For i = 1 To TextDocVar1.Count
                    TextDocVar1(i).Texts(1).AppliedCharacterStyle = "notes_with_indent"
                myind.FindTextPreferences = idNothingEnum.idNothing

            Is there any default code to overcome the error like we did before and after "myind.FindTextPreferences = idNothingEnum.idNothing" string.