{I+=codeWee;}
[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();

HTML | PHP | C++ | DirectX11 | Javascript | C# | HTML5 | ASP | SQL | General | CSS | Oculus Rift | Unity3d | Virtools SDK | Tip | NSIS | PowerShell | node.js | Web API | RTSP | All
Copyright© 2016 CodeWee.com All rights reserved.