Microsoft.Office.Interop.Word
-
Hi All, I am using below method to find the text in the word document and replace. word.Selection.Find.Execute(ref findText, ref matchCase, ref matchWholeWord, ref matchWildCards, ref matchSoundsLike, ref nmatchAllWordForms, ref forward, ref wrap, ref format, ref replaceWithtext, ref replace, ref matchkasdia, ref matchDiacrities, ref matchAlefHamza, ref matchcontrol); However we had a new requirement like searching the text which starts with # and end with # eg: #name# -- it will be in the word document In c# we need to get the value "name" How to achieve this.Please Advice. Ramkumar ("When you build bridges you can keep crossing them. ") http://ramkumarishere.blogspot.com
-
Hi All, I am using below method to find the text in the word document and replace. word.Selection.Find.Execute(ref findText, ref matchCase, ref matchWholeWord, ref matchWildCards, ref matchSoundsLike, ref nmatchAllWordForms, ref forward, ref wrap, ref format, ref replaceWithtext, ref replace, ref matchkasdia, ref matchDiacrities, ref matchAlefHamza, ref matchcontrol); However we had a new requirement like searching the text which starts with # and end with # eg: #name# -- it will be in the word document In c# we need to get the value "name" How to achieve this.Please Advice. Ramkumar ("When you build bridges you can keep crossing them. ") http://ramkumarishere.blogspot.com
I found my answer http://stackoverflow.com/questions/2989194/select-range-by-string Ramkumar ("When you build bridges you can keep crossing them. ") http://ramkumarishere.blogspot.com