DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Select content after PasteString()

  • gcrews

    Select content after PasteString()

    Participants 1
    Replies 2
    Last Activity 7 years, 6 months ago

    XMetaL(R) Author Enterprise 7.0
    Version#: 7.0.0.111

    Is there a way to select the pasted content after calling Paste() or PasteString()

    Reply

    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

    gcrews

    Reply to: Select content after PasteString()

    Perfect works exactly as I needed, Thanks for the help and quick reply. I would have never thought about creating a duplicate range selection variable or even knew to use the ExtendTo method.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support