Home Forums General XMetaL Discussion Finding and returning exact insert location Reply To: Finding and returning exact insert location

Derek Read

Reply to: Finding and returning exact insert location

I'm not sure about your first issue, but I'm going to guess 2 things:

1. Your schema does actually allow to appear before . If it did not then I would not expect FindInsertLocation() to move the range there.
2. Part of your issue might be with your call to Collapse(1). If I understand what your code is doing it is selecting all of then collapsing to the start, which is before the . I guess you should actually be collapsing to the end, or you should be finding the and then moving the Range after it. Depending on what your document content looks like in real world use you might actually want to do the latter.</p> <p>Regarding your “other” issue:<br />I think I'd need to see a working example. If you want to submit one to XMetaL Support that would be best, unless you don't mind sharing it on the forum. However, I would recommend that you check to see that your starting range is before the valid insert location. If it isn't then that's your issue, or you need to call it with the <tt>boolSearchForward</tt> parameter set to false.