Hello,
I have some problems with the "SelectionAsString" function.
I have two merge fields like that:
<<Mergefield_1>>
<<Mergefield_2>>
What I try to do is to put my cursor in the right place to add text between the 2 merge fields.
pwptDoc->SelStart = 14; (end of the first merge field)
pwptDoc->SelLength = 0;
pwptDoc->CPPosition = 14;
pwptDoc->SelectionAsString = "myString";
But by doing this, it deletes me the "<<" of the second merge field, which isn't recognize as a merge field anymore.
(I've already tried just with "pwptDoc->SelectionAsString = "myString";" but it didn't work neither).
I have noticed that when I'm at the end of the first line and try to select the next character with "Shift+ Right Arrow", it selects the whole second merge field.
But when I delete the same character I've tried to select before (with the "Del" key), it deletes me the carriage return. Maybe it has something to do with my problem.
Can you tell me if it's normal? How can I fix my problem?
Thanks,
Claire.