views:

81

answers:

1

I'm currently in a development team trying to come up with an app that will be able to accept an Open XML Word document, shred the XML and somehow come up with UI screens on the fly that could be used for data entry.

I'm using the Open XML SDK but my challenge has been to come up with a very generic means of representing the document as the SDK requires that a static representation (call it a template or mask) be defined in code which can then be used to shred the document programmatically.

As an example to shred a certain doc, i have to go into code and define the theme, fonts, paragraph style etc of the word doc in order for the program to "know" how to shred it.If the style of the doc changes then the program also has to change.

My question is, is there a way of doing this generically so that i wont have to care about the style used in coming up with the word document? Has anyone attempted generating screens/ data entry fields from a word document before.

Any help will be appreciated.

+1  A: 

Open XML allows you to use an xml schema to bind data to certain parts of the document with content controls. You can then use the xml schema as a starting point for your data entry app.

Mapping content controls to custom xml:

Either you have control over the custom xml in the document and your UI is pretty static, or you could generate a data entry user interface on-the-fly based on the custom xml schema

I think there is a way to have Word itself serve as your data-entry UI, so you won't even need a custom UI.

StephaneT