4 Replies Latest reply on Nov 5, 2008 2:17 PM by (Bruce_Rayne)

    Object is invalid - but only on Windows

      Hi all,
      I created a small script that opens a document, then creates a new document, copies some elements from the old doc to the new doc, saves the new doc, then closes the new doc.

      I created it on the Mac, and it works exactly as intended, but when I move the script across to Windows, I get this error:

      Error Number: 45
      Error String: Object is invalid
      Line: 92
      Source: NewDocument.close(SaveOptions:NO);

      Here are the last two lines of code:

      NewDocument.save(NewDocumentFile);
      NewDocument.close(SaveOptions.NO);

      Now here's the thing. The "NewDocument" saves without a problem. So can anyone tell me why the "NewDocument" object would become invalid when I try and close it? More importantly, why this error only happens on the Windows platform?

      Thanks,
      Bruce