I did what I said in my comment, downloaded DocX, created a Microsoft Word document and ran this code from a project referencing the DocX library:
// Contains "Foo.Bar and Foo. Bar"
string filename = "TestWordDocument.docx";
using (DocX document = DocX.Load(filename))
{
document.ReplaceText(".B", ". B");
document.ReplaceText(". B", ". B");
document.Save();
})
And the Word file, prior containing:
Foo.Bar and Foo. Bar
Afterwards contains:
Foo. Bar and Foo. Bar
So, works for me.
Edit: I ran your code on a file containing the first line from your question, and it works. Are you sure you're running this code and that you're looking at the correct file?