This is how I define the find object:
Range rngDoc = m_oDocument.G开发者_高级运维etContent();
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?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.
EDIT: It seems that problem occurs whenever there is a table in the range. Does anyone have a solution to this problem?
精彩评论