Page 1 of 1

Populate content control created manually in Word

PostPosted: Thu Jul 23, 2015 11:45 pm
by EagleBeak
I have similar requirements as this guy: data-binding-java-f16/can-i-add-content-controls-in-word-without-any-add-inn-t1987.html

Unfortunately that thread seems dead, so I post a new topic. I need to create relatively simple documents (invoices for now). I have to rely on non-technical users for maintaining the templates and don't want to burden them with additional tools. Hence the requirement to prepare the template completely in Word.

I've skimmed through the getting started guide and a few samples, but this seems more complicated than I had (naively) assumed. I described where I got stuck here: ... ith-docx4j

My question here is: Is this even a reasonable idea? If yes, what am I missing? If not, what might be a reasonable alternative (easy to implement, as little tool overhead for non-technical users as possible)?

If I come across as total doc manipulation noob here: sorry, but that's what I actually am. So if you know about a good hands-on tutorial for my use case, I'd be very thankful for that too.

Re: Populate content control created manually in Word

PostPosted: Fri Jul 24, 2015 6:57 pm
by jason
With Word 2013, you can use just Word for simple data binding (ie not for OpenDoPE repeats, conditionals etc).

With earlier versions of Word, you need an addin installed to make it easy. Or possibly you could do the same using VBA. But either way, there is something to install in Word.

An alternative would be to have your users insert codes on the surface of the document (which is how some competing solutions work, although this approach tends to be brittle since Word can "split the runs" or your authors can mistype), and then use docx4j to convert those codes to data bound content controls. I've been meaning to add something to automate this for a while.

I answered your question at ... ith-docx4j

Please avoid cross-posting.