Home Forums DITA and XMetaL Discussion Select content after PasteString() Reply To: Select content after PasteString()

Derek Read

Reply to: Select content after PasteString()

Maybe something like this:

[code]//XMetaL Script Language JScript:
var rng1 = ActiveDocument.Range;
var rng2 = rng1.Duplicate;
var str1 = “test”;
if(rng2.CanPaste(str1)) {
  rng2.PasteString(str1);
  rng1.ExtendTo(rng2);
  rng1.Select();
}
[/code]

Reply

Products
Downloads
Support