Home Forums General XMetaL Discussion Count Macro Reply To: Count Macro

mag3737

Reply to: Count Macro

Paste this into your document (all three lines):

[code]
//XMetaL Script Language JScript:
var nodelist = ActiveDocument.getElementsByTagName(“coc”);
ActiveDocument.Host.Alert(nodelist.length);
[/code]

The 2nd-3rd lines are the actual script, which you could put into a macro if you wish.

The first line is a little bit of XMetaL magic that allows you to run script code quickly by pasting it into the active document.

Reply

Products
Downloads
Support