Home Forums General XMetaL Discussion Saved property Reply To: Saved property

KdG

Reply to: Saved property

Hi Derek,

This can be reproduced with the journalist sample file “CamerasInFocus.xml”.

When you execute the script below (simply paste it into the document) the file ends up marked as “not saved”.
You can see this from the Save-button in the buttonbar, which appears as active (blue), although the file was saved properly by the script.

// XMetaL Script Language JSCRIPT:
var rng = ActiveDocument.Range;
rng.MoveToDocumentStart();
rng.MoveToElement(“Article”)
rng.ContainerAttribute(“Id”) = “ABCD”;
ActiveDocument.Save();
ActiveDocument.Saved = true;
Application.Alert(“Final status Saved = “+ActiveDocument.Saved)

Reply

Products
Downloads
Support