Page 1 of 1

how to get the data from textbox in worddoument 2007

PostPosted: Wed Nov 06, 2013 12:10 am
by teja1524
hi
my requirement is to replace image in textbox using docx file.
here iam attaching the msworddocument.
how get the data from textbox

with regards
teja

Re: how to get the data from textbox in worddoument 2007

PostPosted: Wed Nov 06, 2013 7:47 am
by jason
If you don't want to use content control data binding, as I previously recommended in your other post...

You'll need to find the text box first. To do that, you can use XPath or TraversalUtil.

To find it, you'll need to know what object represents a textbox. To find that out, upload your docx to the webapp (linked in the menu above)

After that, it is just like adding an image (as to which see the ImageAdd sample)

(Or instead of the above approach, you could do what VariableReplace does, which is a JAXB marshal/unmarshal cycle, but again, you're on your own with that method)