Home › Forums › General XMetaL Discussion › node list issues/questions › Reply To: node list issues/questions
Reply to: node list issues/questions
March 18, 2015 at 7:28 pmSince each change is causing the document to update it would make it even faster (and stop flickering) to turn off document updating at the start and end. This issue will be more noticeable when there are many draft-comment elements in a larger document.
[code]//XMetaL Script Language JScript:
ActiveDocument.FormattingUpdating = false;
rng = ActiveDocument.Range;
rng.MoveToDocumentStart();
while(rng.MoveToElement(“draft-comment”)) {
if(rng.CanChange(“note”)) {
rng.ContainerName = “note”;
}
}
ActiveDocument.FormattingUpdating = true;[/code]