I need to create a Building Block Gallery with defined Content Controls to make it easy for others to create word documents that would be ready to accept my data. I'm trying to make this as painless for the users as possible.
I wanted to make sure all this would be professionally done and look good so I wan't to make sure all the Content Controls are basically the same just with different Names/tags and original content. Doing this inside Word isn't so easy and would take some time. Sometimes when I change the Content inside it changes from the greytext to the standard and sometimes it doesn't ( not sure why, think it has to do with how I overwrite the "place text here" thing). So I thought doing it programatically would work.
Then I read in some OpenXML FAQ that this isn't possible. Somthing that I do not understand. If I store the Building Block inside a .dotx file it mus be somewhere inside the XML there right? I should be able to access it. Where is it stored?
I would be greatful for pointers here, mainly the answer to the question how do I create multiple Content Controls inside a custom Building Block gallery.
Content controls can live inside building blocks just fine. In fact, most of the built-in building blocks that Word 2007 ship with include content controls inside them.
The shipping building blocks are stored:
I think you can create your own .dotx file (with its own building blocks) and place it in the same folder to get Word to load it on boot.
In the .dotx file itself, its stored under \word\glossary\document.xml.
I'd be surprised if you couldn't create a building block entry that had content controls in it manually, at least. I don't know if the OpenXML SDK can do it - when it's mentioned that it isn't possible, it just might be that it doesn't have the capability to do so, and not that it's technically impossible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With