Count Figures in Document
I've written a script that provides a page and table count for each document and a total for a book. I also want a count of all figures in each document. I tried the following, but counting graphic objects gives me a count that is many times more than the number of figures in the document.
function countFigures() {
figureCtr = 0;
var figure = doc.FirstGraphicInDoc;
while (figure.ObjectValid()) {
figureCtr++;
figure = figure.NextGraphicInDoc;
}
return figureCtr;
}I've searched the forum for other examples, without success. We work with relatively large books and these totals are useful in assessing the level of effort for each book.
Many thanks in advance...
