@Franta Dvojka , based on my test, I find the startindex indeed exists some problems. I used the following code to make a test.
static void Main(string[] args)
{
object missing = Type.Missing;
Word.Application app = new Word.Application();
Word.Document document = app.Documents.Open("D:\\3.docx");
//app.Visible = true;
Word.Range rng = document.Content;
rng.Start =80;
rng.End = 94;
rng.Find.ClearFormatting();
rng.Find.Forward = false ;
rng.Find.Text = "Name";
rng.Find.Execute(
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
int intFound = 0;
while (rng.Find.Found)
{
intFound++;
rng.Find.Execute(
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
}
document.Close();
Console.WriteLine(intFound);
Console.ReadKey();
}
The word example:
I can searched all the text called "Name" 3 times, but I set the index from 80~94. I think there is some problem here.
Therefore, I have two suggestions about your problem.
First, please try to avoid searching the text by using start index and end index in Table and use it in paragraph.
Second, you can try my code to check if the searching to the left.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.