how to bind custom property to textbox

Aug 24, 2009 at 9:16 AM


i am excited by this approach of parsing word 2007 document.

when possible any of the member can help me understand the missing point.

1. i am preparing a Word Document (like template form) which has textbox, check boxes,etc.

2. User key in values. previously we have used VBA to parse the values and insert in db (in vba) code.

3. since the document (docx) itself now XML, would like to use the approach suggested in this tool to parse the content.

4. Please point out my view of achieving solution is correct as suggested by this tool binding custom property to placeholder?

Thank you,



Aug 27, 2009 at 8:54 AM
Hi sahridhayan,

I am not sure if I fully understand your question. Are you asking for an example of how to bind custom property values to placeholders?

If so you can find an example on my blog scroll down until you find the section.


DocX - A .NET library for manipulating Word 2007 files
Subsection 2 entitled "Set custom properties" is what you are looking for.

Let me now if this helps,
kind regards.
Aug 27, 2009 at 9:47 AM


Thanks for replying, are you referring the content under this link?

in detail, i reproduce the scenario as,

1. i create a document. (docx)

2. insert a text box (note not content control)

3. create custom property as you mentioned.  (freegift...)

4. now i want to bind the customer property to textbox.

5. So that when i retrieve value from custom property i should get the value from text box what ever the user keyed in.

6. Am thinking in right direction, because the sample which you have shown is explaining how to bind values programmatically. (mine the other way round).

thanks for your help in advance,