Home Forums General XMetaL Discussion MoveToElement() Help Reply To: MoveToElement() Help

Derek Read

Reply to: MoveToElement() Help

I don't see any issues with the API, so I guess there's probably an issue with your logic.
Here's a simplified script you can test with that uses the API in a similar way to return all the element names by moving a Range:

[code]//XMetaL Script Language JScript:
var rng = ActiveDocument.Range;
rng.MoveToDocumentStart();
while(rng.MoveToElement()) {
Application.Alert(rng.ContainerName);
}[/code]

Reply

Products
Downloads
Support