
Signature
Address email to user "response" at domain "alexoren" with suffix "com"
How about Range2.Start = Range2.Start + [length of inserted text]

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Hello people,
Here is a problem that got me scratching my head.
The requirements appear simple:
Given a range in a document,
insert some text (say a paragraph mark) after it
without this text bleeding into adjacent bookmarks and/or ranges).
That is, given:
[Range1][Range2]
Should result in:
[Range1]Text[Range2]
(I cannot adjust Range2 after the fact because at the time I may be holding
a multitude of ranges that might be affected).
The biggest problem is when the ranges consist of Word tables.
That is:
[Table1][Range2]
Should result in:
[Table1]Text[Range2]
Or, alternatively:
[Range1][Table2]
Should result in:
[Range1]Text[Table2]
Any ideas?
Best wishes,
Alex.

Signature
Address email to user "response" at domain "alexoren" with suffix "com"
Alex - 17 Oct 2005 15:49 GMT
Hello Doug,
This is what I am currently doing.
However, this is not an optimal solution since I have to go over *all* the bookmarks (and all the ranges that are currently held) that can possibly be adjacent to my change and check if any of them has to be modified.
Best wishes,
Alex.
> How about Range2.Start = Range2.Start + [length of inserted text]
> Hello people,
>
[quoted text clipped - 26 lines]
>
> Any ideas?

Signature
Address email to user "response" at domain "alexoren" with suffix "com"