Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Exporting each articles button names to an Excel Spread Sheet or other form

$
0
0

You could run a simple script like this:

 

#target indesign

// Carlsen

var doc = app.activeDocument;

var buttonNames = doc.buttons.everyItem().name;

var buttonNameArray = [];

for (var b = 0; b < buttonNames.length; b++) {

          buttonNameArray[b] = buttonNames[b];

}

buttonNameArray.sort();

var f = File("~/Desktop/ButtonList.csv");

f.open('w');

f.encoding = 'UTF-8';

var l = buttonNameArray.length;

for (var i = 0; i < l; i++) {

          f.writeln(buttonNameArray[i]);

}

f.close();

 

which just writes a list of names to a text file. If we use the extension ".csv", Excel can Open it and put all the names in the first column of the new spreadsheet.


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>