none
Problem with Newlines in editable areas in locked document RRS feed

  • Question

  • Hi!

    We're trying to insert text into a word document via the Selection.TypeText method, which works flawlessly in documents which are not locked. Now we have run into a customer who uses protected documents with various editable ranges in their document and the problem here is that when we insert a linebreak at the end of the editable area then the editable area is not expanded and it's not possible to insert anymore text at that insertion point. Now if we were to manually hit enter on the keyboard instead of using Selection.TypeParagraph() then everything works splendidly.

    How do we work around this? I've noticed that if I use Selection.TypeText("\v") then it works fine, but I have no way of knowing if I'm inside or at the end of an editable area.

    Monday, August 19, 2019 1:33 PM