views:

32

answers:

1

This is how I define the find object:

    Range rngDoc = m_oDocument.GetContent();
    nEnd = rngDoc.GetEnd();
    rngDoc.SetRange(nStart,nEnd);//do not search entire document -> faster
    Find fn = rngDoc.GetFind();

However, when I execute the Find, it finds objects that lay before the given start. Any idea how do I define where the find should search?

Thanks!

A: 

Solved!

Problem was that the start of the Range was in a table cell and the end was the end of the document. For some reason, Find then searches entire cell, and not from the beginning of the range.

Bojan Hrnkas
Great. You can accept your own answer (click the checkmark next to this) as the correct answer.
Otaku