var savefile = new File("~/Desktop/sample.psd"); var psdOpt = new PhotoshopSaveOptions(); // PSD形式オプション psdOpt.layers=true; // レイヤーを保持 activeDocument.saveAs(savefile, psdOpt, true, Extension.LOWERCASE);