Checking Blank Fields in Specific Pages of a Multi-Page Document
Hi everyone,
Please, I would like your help to figure out how this can be done. Following one of the discussions here, I found the following code to check blank fields, which works amazingly.
var emptyFields = [];
for (var i = 0; i < this.numFields; i++) {
var f = this.getField(this.getNthFieldName(i));
if (f.type !== "button" && f.required) {
if (f.valueAsString === f.defaultValue) {
emptyFields.push(f.name);
}
}
}
if (emptyFields.length > 0) {
app.alert("Please complete the following fields:\n" + emptyFields.join("\n"));
} else {
app.execMenuItem("SaveAs");
}
However, since my document has 5 pages, I would like to check only the blank fields on the first 2 pages (Not all the document). How can this be specified within this code, please?
Thanks alot
