Copy link to clipboard
Copied
I didn't think it was going to be that difficult to go from VBA to JS (not having a clue on JS). Here's my first JS script to help with this question. It should work for CS4.
http://forums.adobe.com/thread/726864?tstart=0
//splits the activeDocument Artboards into individual files
var doc = app.activeDocument;
var docName = doc.name;
var docPath = doc.path;
var fullName = docPath + "/" + docName;
var abRange = ""
for (i=1; i<=doc.artboards.length;i++)
{
abRange = abRange + i + ","
}
IllustratorSaveOptions.saveMultipleArtboards = true;
IllustratorSaveOptions.artboardRange = abRange;
var newFile = new File(fullName);
app.activeDocument.saveAs (newFile, IllustratorSaveOptions);
alert ("Artboards Saved to current document's Folder", "Split Arboards");
Copy link to clipboard
Copied
Carlos:
artboardRange | string | r/w | If SaveMultipleArtboards is true (Which is valid for AI 13 or earler saves only),this will be considered for multi-asset extraction which specifies artboard range.Empty string will extracts all the artboards.Default is empty string. |
(my emphasis). So you can probably do with just this:
IllustratorSaveOptions.artboardRange = "";
Copy link to clipboard
Copied
that's correct, I didn't try to test it with empty string before. Only difference I found using empty string is it Re-saves the Active Document too (with all artboards) (and also asks if it is ok to overwrite) + all separate files.
thanks for pointing that out.