“Advance – Invoice Example.zip” is a zipped Visual Studio 2008 solution that I created to demonstrate how far DocX has evolved since version 1.0.0.1. The first time that you run InvoiceExample.exe it will check for the existence of a document called “InvoiceTemplate.docx”, because this is the first execution this document will not exist, so it is created.
Figure 1.0 - InvoiceTemplate.docx created by first run of InvoiceExample.exe
It is important to note that everything you see in the above screenshot was created by DocX. If you now run InvoiceExample.exe again the document “InvoiceTemplate.docx” is found and it is now used to create an invoice for a factitious company called “The Happy Builder”.
Figure 1.1 - Invoice_The_Happy_Builder.docx created by second run of InvoiceExample.exe
As you can see DocX has loaded the document “InvoiceTemplate.docx” into memory and customized it. This was done by setting custom property values, inserting an image, creating a picture from this image, and replacing a Table with a new Table that contains data from a data source.
This example is intended for an experienced user of DocX. A first time user may find this solution overwhelming. Over the next few days, I am going to create a video tutorial called "Getting started with DocX". This video will be targeted at the first time user of DocX.
I hope that from this example you can see how quickly Docx is growing and also how useful it is becoming. As always if you would like to report a bug, request a feature or even just say hi, please email me at coffey.cathal@gmail.com.
happy coding,
Cathal
DocX is completely free, but if you have found it useful and you would like to make a donation you can do so via paypal.
Paypal link report:
ReplyDelete"Sorry, an error occurred after you clicked the last link"
Really awesome piece of work, I will definitely it it a try. Documents looks really nice generated through this tool.
ReplyDeletevery attractive work
ReplyDeleteGreat project Cathal, makes generating data driven word docs a breeze.
ReplyDeleteSounds so interesting and will surely try.. i am sure i would be big fan after looking at it. developerjigar@gmail.com
ReplyDeleteHi! I've been trying to develop an example test application to test the merging of fields in my own docx template. I'm confused as to what type of field to add for these merging fields in Word 2010?
ReplyDeleteI looked through your source code that updates these fields and it appears that the method UpdateCustomPropertyValue looks for DOCPROPERTY elements. Why is this? I would've thought that mail merge would've been more appropriate?
hii Cathal
ReplyDeleteI've been trying combine docx file but can't open because "cannot be opened because there are problems"
thank you
engin.hazar@gmail.com
Great tool, But here i facing few problems.
ReplyDeleteI load .dotx template and save as .docx file.
my dotx template contains textbox that not read by DocX.Load() method
it gives error "sequence does not contains element".
Thanks..
chintanavailable@gmail.com
I have a question here.. Once you create table , do we have a option to repeat the table header in each page of the word doc once page is more than 1.
ReplyDeletewhere is the video @Cathal?
ReplyDeletei'm interested with your project....
fgroupindonesia.com
This comment has been removed by the author.
ReplyDeleteHi, I have some html content which i want to add to my word doc. But its showing html tags as it is. For e.g. "Hi" as printed as it is. What i want is it to be bold. Any leads are appreciated. Thanks!!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteDo you have a line count object? For instance, If i want to count the number of lines on a page so that i can insert a picture in the middle of the page, how do i do that? Thanks.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI'd like to let the headings get numbered automatically. (Just like at Word 2010 when you press the button "List with many level" and select the option where the headings get numbered just as I want them to (the standard word functionality)). Is there a way to accomplish this using DocX
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for the docx library and helping .net coding tips!
ReplyDeleteThanks for the docx library. It really made my work easy :) Very helpfull.
ReplyDeletewhere is the code. ok
ReplyDeleteGit Hun. The link is there above which will redirect you to Git Hun
DeleteAnd where is the video?
ReplyDeleteIs the example still available somewhere?
ReplyDeleteThank you for bringing more information to this topic for me. I’m truly grateful and really impressed.
ReplyDeletexml data conversion
Thank you ,thank your product, I used 'DOCX' to solve a problem of batch words replace,It'very effective
ReplyDeleteDocX is availabled for .NET 3.5 because i have visual studio 2010. i want create word document in sharepoint library from content type?
ReplyDelete