Make a text box attribute non-printing in InDesign v20.1 using JavaScript
I had so much success with my 1st post (question) Thanks @rob day Next question. Have a text box at top of page that is the document version. For proofing to client, I need this to print so client can see what version they are looking at. But when printing the live print I need to make this texy box non-printing. Looking for a script that can make text box non-print. I have tried this script:
document.textFrames.item("version").nonprinting = true;
I have the text box labeled using script label as “version” (with no quotes).
I am getting below error:

I also tried the below script:
var version = doc.textFrames.itemByName("version");
version.nonprinting = true;
Getting this error:

Again Thanks VERY MUCH for all help and comments!
