Article View: adobe.scripting.indesign
Article #616Close all documents
From: hm24_arul
Date: Tue, 10 Mar 2009 14:07
Date: Tue, 10 Mar 2009 14:07
24 lines
1257 bytes
1257 bytes
Hi scripters,
I have 15 documents open in my indesign application. I am trying to close all the documents. Please see my code below
if(app.documents.length!=0)
{
for (i=0; i<app.documents.length; i++) { app.documents.item(i).close(SaveOptions.no); } } else {null;}
if(app.documents.length!=0)
{
alert('All documents are closed')
}
else
{
alert('Still documents are opened')
}
It works good but, not all the documents are closed, before getting the app.documents.length=0 the alert box is popping. And still some documents are opened.
Please advice me how can I close all the documents?
thanks in advance
regards
a r u l
Technical Details
Message-ID:
<59b82bd9.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,bedace1126cd858f,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: hm24_arul@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Close all documents Message-ID: <59b82bd9.-1@webcrossing.la2eafNXanI> Date: Tue, 10 Mar 2009 07:07:47 -0700 Lines: 31 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit