You said ...
The only thing that I did was add the Microsoft Office 14.0 object library in references.
Why was that? The code uses Early Binding, that is, it refers to the Word Application rather than just an Object. Without the reference, the code would not compile and would not, therefore, execute. Have you changed from Excel 2007 to Excel 2010?

Have you got any "Missing References" in your references list?