I use something like this:
doc.Content.Find.Font.Name = "Times New Roman";
but when I step through the code the Name property doesn't change. thanks.
I'm working with VS2010 and MS Word 2007 and I want to find and replace all "Times New Roman" fonts with "Arial".
Here's what happens:
Word.Application wordApp = new Word.Application();
Word.Documents docs = wordApp.Documents;
doc = docs.Open(fileName, Visible: false);
doc.Content.Find.ClearFormatting();
doc.Content.Find.Replacement.ClearFormatting();
// Here the value of Find.Font.Name and Replacement.Font.Name is ""
doc.Content.Find.Font.Name = "Times New Roman";
doc.Content.Find.Replacement.Font.Name = "Arial";
// The value of Find.Font.Name and Replacement.Font.Name still "" !!!
doc.Content.Find.Execute(Format: true, Replace: Word.WdReplace.wdReplaceAll);