Check if the file opened is a idml file
Hi guys, I'm tryin to write a jsx script to detect wheter the active document is idml file, if so save it as indd. For that, my first approach is trying to get the fullname of the active document because if it is a idml file will throw an error.
function checkIfDocumentHasFullName(document) {
try {
document.fullName;
return true;
} catch (e) {
alert("Some message");
return false;
}
}But I'm wondering if there could be other scenarios where this could happen as well or maybe other correct way to do this.
Any help much appreciated.
