Reply to: Multiple Entry Tags Add TextMarch 14, 2019 at 9:10 pm
Because users interact with tables in a unique way when compared to standard elements in a document (what the user is seeing doesn't line up 1:1 with the XML so things get complicated) you need to use special (new and as yet undocumented) APIs to get a user's selection when it might consist of selected cells in a table.
Here's something that does what I think your example code is trying to do.
You can paste these into a document to see them run:
[code=VBScript]'XMetaL Script Language VBScript:
If Selection.IsMultiCellSelection Then
Set c = Selection.Cells
For j = 0 to c.length
Application.Alert(“content: ” & Selection.Text)
[code=JScript]//XMetaL Script Language JScript:
var c = Selection.Cells;
Application.Alert(“content: ” + Selection.Text);