How can I get the count of occurrences of a particular word in a Word document using Microsoft.Office.Interop.Word
?
For example, in my Word document I have two ##<Test Sub Clause1>##
tags in different places. I need a total count of its occurrence in a particular document. In my example, it will be 2.
Is there is any predefined function that exists in Microsoft.Office.Interop.Word
to get this count? Or what is the easiest way to accomplish this?