var opt=new IllustratorSaveOptions(); opt.saveMultipleArtboards=true; opt.artboardRange="1-2"; var savefile=new File("~/Desktop/myImageData.ai"); app.activeDocument.saveAs(savefile, opt);