Word Automation search in range

Posted by Bojan Hrnkas on Stack Overflow See other posts from Stack Overflow or by Bojan Hrnkas
Published on 2010-04-30T13:02:05Z Indexed on 2010/04/30 13:07 UTC
Read the original article Hit count: 431

Filed under:
|
|
|
|

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!

© Stack Overflow or respective owner

Related posts about word

Related posts about automation