Amazing !!!
Finally I succeeded to write the hereunder Javascript, which works fine, but with the same result ! It’s impossible to unlink the Excel files without, first, updating the links. But on the other hand, I’m allowed to remove them, which doesn’t really help me… Grrrr
Maybe someone can tell me what I’m missing here ???
if (app.documents.length == 0) alert(“No documents are open. Please open a document and try again.”);
var myLink;
var linkName;
var myDoc = app.activeDocument;
var links = myDoc.links;
var MyCounter= 0;
for(var i = 0; i<links.length; i++){
myLink = links[i];
linkName = myLink.name;
if (myLink.status == LinkStatus.LINK_OUT_OF_DATE || myLink.name.substr(linkName.length-5) == ‘.xlsx’){
MyCounter++;
alert (“link nb “+MyCounter+”: “+myLink.name);
//myLink.update();
//myLink.remove();
//myLink.unlink();
}
}