1 Reply Latest reply on Nov 6, 2007 12:42 AM by (mickey_n)

    [CS2] undoHistory doesn't work

      Hi,
      The following SOAP request for InDesign Server CS2 returns undoSize = 0.
      Why? :(
      Is there any way to enable undo during script operation?

      Thanks


        
        
           
              
                 
      {
      myDocument = app.documents.add();
      myDocument.enableUndo = true;
      app.consoleout(" =" + myDocument.enableUndo);
      myPage = myDocument.pages.item(0);
      myTextFrame = myPage.textFrames.add();
      myTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
      myTextFrame.contents = "Hello World!";
      myTextFrame = myPage.textFrames.add();
      var undoSize =  myDocument.undoHistory.length;
      myDocument.close(SaveOptions.no);
      result = "undoSize = " + undoSize;
      }
            

                  javascript