S
Summer
Hello,
I need to find the character position (start location) of a 'string' or
'word' in the current document .
Eg : The document has a string "<report>" . I have to find the range of this
word or the start location .
I tried the following(Python code). But the find never returned true .
for rge in document.Words:
r.Find.Text = 'mlrepor'
r.Find.Replacement.Text = 'XXX'
r.Find.Wrap = Word.WdFindWrap.wdFindContinue
found = r.Find.Execute(missing, missing, missing, missing, missing,missing,
missing, missing, missing, missing, replaceAll, missing, missing, missing,
missing)
#if (found == True):
# print rge.Start
Thanks !
I need to find the character position (start location) of a 'string' or
'word' in the current document .
Eg : The document has a string "<report>" . I have to find the range of this
word or the start location .
I tried the following(Python code). But the find never returned true .
for rge in document.Words:
r.Find.Text = 'mlrepor'
r.Find.Replacement.Text = 'XXX'
r.Find.Wrap = Word.WdFindWrap.wdFindContinue
found = r.Find.Execute(missing, missing, missing, missing, missing,missing,
missing, missing, missing, missing, replaceAll, missing, missing, missing,
missing)
#if (found == True):
# print rge.Start
Thanks !