Skip to content
Matyas Danter edited this page Dec 11, 2013 · 9 revisions

What is DocX?

DocX is a .NET library that allows developers to manipulate Word 2007/2010 files, in an easy and intuitive manner. DocX is fast, lightweight and best of all it does not require Microsoft Word or Office to be installed. This unofficial fork also supports features such as Sections and Lists - the details are documented at http://labs.tnwinc.com/2012/09/06/docx/

How can I donate to DocX!

DocX is written and maintained by a PhD student --Cathal Coffey-- studying at the National University of Ireland Maynooth. If you have found DocX useful and would like to buy Cathal lunch then you can do so via a paypal donation.

To connect with Cathal on LinkedIn please follow: http://ie.linkedin.com/in/cathalcoffey For Cathal's personal website follow: http://www.cathalcoffey.ie

Cutting Edge

If you do not wish to wait for the next stable release of DocX.dll, you can build your own copy from the latest source code.

What else do I need?

All that you need to install in order to use DocX is the .NET framework 4.0 and Visual Studio 2010, both of which are free.

What are the main features of DocX?

  1. Insert, Remove or Replace text in a document.
    All standard text formatting is available. Font {Family, Size, Color}, Bold, Italic, Underline, Strikethrough, Script{Sub, Super}, Highlight. Here’s a cool example of replacing text across many documents in Parallel.

  2. Paragraph properties are exposed. a) Direction LeftToRight or RightToLeft, b) Indentation, c) Alignment.

  3. DocX also supports a) Pictures, b) Hyperlinks, c) Tables, d) Headers & Footers, e) Custom Properties.

Why would I use DocX?

DocX makes creating and manipulating documents a simple task. It does not use COM libraries nor does it require Microsoft Office to be installed.

The following blog post compares the code used to create a HelloWorld document using

  1. Office Interop libraries,
  2. OOXML SDK,
  3. DocX.

How can I learn more?

I have dedicated a blog to DocX. I regularly post new code examples here. The below videos are also excellent tutorials on how to use DocX.

Advanced Examples

  1. Step by step guide to create an invoice for a company. http://cathalscorner.blogspot.com/2009/08/docx-v1007-released.html

  2. Replace text across many documents in Parallel. http://cathalscorner.blogspot.com/2010/12/replace-text-across-many-documents-in.html

  3. Programmatically manipulate an Image imbedded inside a document. http://cathalscorner.blogspot.com/2010/12/programmatically-manipulate-image.html

  4. Converting DocX into (.doc, .pdf, .html) http://cathalscorner.blogspot.com/2009/10/converting-docx-into-doc-pdf-html.html

Do you have an interesting or informative example that you would like to share? If you do, please email me.

How can I send feedback!

If you have found DocX useful at work or in a personal project, I would love to hear about it. Equally if you have decided not to use DocX, please send me and email stating why this is so. I will use this feedback to improve DocX in future releases. My email address is coffey.cathal@gmail.com.

License

Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

  1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

  1. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

  1. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

Clone this wiki locally