0 Replies Latest reply on Apr 14, 2011 10:05 AM by mdailey77

    Trying to create a custom search command

    mdailey77

      I use Acrobat 9 Extended at my work. I work at a scientific journal publisher and we have to search for certain terms within a pdf file. Right now I have to cut and paste the list of terms into Acrobat's search box. I would like to create a custom menu command that would search for the list of terms with one click.

       

      This is what I have so far:

       

      // JavaScript Document

      function auxmatSearch()

      {

         search.matchCase = false;

         search.wordMatching = "MatchAnyWord";

         search.bookmarks = false;

         search.query("aux electronic suppl supporting online repository dynamic content appendix appendices", "ActiveDoc");

      }

      app.addMenuItem(

      {

         cName : "Aux Mat Search", cParent : "Tools", cExec : "auxmatSearch()"

      }

      );

       

       

       

      It doesn't work in Acrobat. It keeps giving me an illegal character error in the Javascript console in Acrobat. What am I doing wrong? I have almost no experience writing Javascript. Any suggestions would be appreciated. Thanks.