Codeplex | GitHub | Blog | Donate
DocX is a .NET library that allows developers to manipulate Word 2007/2010/2013 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.
DocX is available on both Codeplex and Github. We will try to update both.
Install-Package DocX
DocX was written 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
Currently the development of DocX is mostly done by great support of community with project being maintained by Przemysław Kłys (MadBoy).
To connect with Przemek on LinkedIn please follow http://www.linkedin.com/in/pklys
For Przemek own little company website visit Evotec
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.
All that you need to install in order to use DocX is the .NET framework 4.0 and Visual Studio 2010 or later, both of which are free.
- 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
- Paragraph properties are exposed:
- Direction LeftToRight or RightToLeft,
- Indentation,
- Alignment
- DocX also supports:
- Pictures,
- Hyperlinks,
- Tables,
- Headers & Footers,
- Custom Properties
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:
- Office Interop libraries,
- OOXML SDK,
- DocX
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.
- Step by step guide to create an invoice for a company. http://cathalscorner.blogspot.com/2009/08/docx-v1007-released.html
- Replace text across many documents in Parallel. http://cathalscorner.blogspot.com/2010/12/replace-text-across-many-documents-in.html
- Programmatically manipulate an Image imbedded inside a document. http://cathalscorner.blogspot.com/2010/12/programmatically-manipulate-image.html
- 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.
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
Cathal has another open source project sql4csv. sql4csv is a python library that offers an SQL "like" interface for .csv files.