[C#] OpenXML: Open Microsoft Word File
// download and install OpenXML SDK 2.5: http://www.microsoft.com/en-us/download/details.aspx?id=30425
// add reference: DocumentFormat.OpenXML, Windows.Base
//
..
using DocumentFormat.OpenXml.Office2013.Word;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
..
WordprocessingDocument wordprocessingDocument = WordprocessingDocument.Open(@"e:\a.docx", true);
// Assign a reference to the existing document body.
Body body = wordprocessingDocument.MainDocumentPart.Document.Body;
// Add new text.
Paragraph para = body.AppendChild(new Paragraph());
Run run = para.AppendChild(new Run());
run.AppendChild(new Text("abc"));
// Close the handle explicitly.
wordprocessingDocument.Close();