Answered
Javascript to check if a named indd is already open
Hi all,
I'm trying to sort out this bit of code that checks if a named file is open in InDesign. When the indd isn's open it's throwing an error.
Error String: Object is invalid
if( app.documents.itemByName(" RH KEEP ME.indd").visible == true )
{
alert("Found it");
}
else
{
alert("Not found");
}What have I gone and done this time?
Many thanks in advance if you can help.