Do you want to: Report a bug / Ask a how-to question
Up until now, if i wanted to unlock a ContentControl (i meant It can be modified & deleted) I used :
aContentControls[i].SetLock("unlock");
However, since version 9.0.0, it has stopped working — more precisely, since the “[bug] fix bug 74161” update. Unfortunately, I couldn’t find a description of this bug. :s
In practice :
Asc.plugin.callCommand(
function() {
var oDocument = Api.GetDocument();
var aContentControls = oDocument.GetAllContentControls();
for (var i = 0; i < aContentControls.length; i++) {
console.debug(aContentControls[i].GetLock());
aContentControls[i].SetLock("contentLocked");
console.debug(aContentControls[i].GetLock());
aContentControls[i].SetLock("unlocked");
console.debug(aContentControls[i].GetLock());
}
}
);
and the console output is :
unlocked
contentLocked
contentLocked
There is anotherway to just unlock the the contentcontrol?
Thanks