7 Replies Latest reply: Mar 13, 2012 5:53 AM by JHowe99 RSS

    How to suppress "not in the paragraph catalog"

    JHowe99

      I have a script to generate HTML below. This works, however some documents create the "Paragraph tag ... is not in the Paragraph Catalog" dialog.  I need the script to not require any input, so how can this be suppressed, or push all items into the catalog before saving? 

       

      Also I haven't seen it yet, but suspect similar issues could occur with tables and characters not in the catalog.

       

      Alternatively, something that can intercept dialogs and hit "ok" would work.

       

      Thanks

       

      function saveCsrHTML(doc, suffix) {

          var saveDirname = doc.Name.substr(0, doc.Name.lastIndexOf("\\"));

          var saveBasename = basename(doc.Name);

       

          var params = GetSaveDefaultParams();

       

          var i = GetPropIndex(params, Constants.FS_FileType);

          params[i].propVal.ival = Constants.FV_SaveFmtFilter;

       

          var i = GetPropIndex(params, Constants.FS_SaveFileTypeHint);

          params[i].propVal.sval ="0001ADBEHTML";

       

          var i = GetPropIndex (params, Constants.FS_SaveMode);

          params[i].propVal.ival  = Constants.FV_ModeSaveAs;

       

          var i = GetPropIndex (params, Constants.FS_RetainNameStripe);

          params[i].propVal.ival  = 0;

       

          var i = GetPropIndex(params, Constants.FS_AlertUserAboutFailure);

          params[i].propVal.ival = false;

       

          var returnParamsp = new PropVals();

          var filename = saveDirname + "\\" + saveBasename + suffix + ".html";

          doc.Save(filename, params, returnParamsp);

      }