RE: Find text in Word - without affecting the Find dialog box
- From: jialge@xxxxxxxxxxxxxxxxxxxx (Jialiang Ge [MSFT])
- Date: Wed, 17 Oct 2007 02:55:31 GMT
Hello Dave,
For the first question: how to efficiently find a string in Word plain
text, please refer to the String searching algorithms introduced in page:
http://en.wikipedia.org/wiki/String_searching_algorithm. It describes
serveral commonly used algorithms. For this case, I think that the KMP
(Knuth-Morris-Pratt) algorithm will be fine according to its time
complexity: O(m+n), (Let m be the length of the pattern and let n be the
length of the searchable text.) For details about KMP, see:
http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm.
For the second question, Word does not expose any method to detect if a
built-in dialog is opened or not. Therefore, I think we need to use our own
search function for all the cases.
If you have any other concern or need anything else, please feel free to
let me know.
Sincerely,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- RE: Find text in Word - without affecting the Find dialog box
- From: Jialiang Ge [MSFT]
- RE: Find text in Word - without affecting the Find dialog box
- From: Jialiang Ge [MSFT]
- RE: Find text in Word - without affecting the Find dialog box
- Prev by Date: RE: Office 2007 "__missing_type__" while importing msword.olb
- Next by Date: RE: Find text in Word - without affecting the Find dialog box
- Previous by thread: RE: Find text in Word - without affecting the Find dialog box
- Next by thread: RE: Find text in Word - without affecting the Find dialog box
- Index(es):
Relevant Pages
|