5 Replies Latest reply on Apr 6, 2013 4:26 AM by shilpa25

    Import TXT file in User Dictionary

    shilpa25 Level 1

      Hi Forum,

       

      This is the script I m using for importing txt file in "User Dictionary" but the result is "undefined".

       

      Could anybody help me how to import Txt file in User dictionary.

       

      var myUserDictionaries = app.userDictionaries;

      var myCountDict = myUserDictionaries.count();

       

       

      var myDoc = app.activeDocument;

      myAddedWords= File("//Users/wleastudio/Desktop/AVIVA_dictionary.txt");

       

      for (var i = myCountDict-1; i >= 0; i-- ) {

          myUserDictionary = myUserDictionaries[i];

          var myAddedWords = myUserDictionary.addedWords;

          myUserDictionary.addWord[myAddedWords];

      }

       

      thanks