Word side bar plug in to insert Content Controls into Word documents
Project detail
The request I have is, would you be able to do a side panel to allow users to easily assign Content Controls to pieces of text within their documents and turn them from docx contracts to template ones (still DOCX – I’m not sure we need actual word templates unless there are specific good reasons I don’t know about .)
I would provide the side bar code initially and this would contain a windows form.
What I want the users experience to be:
* User opens document and clicks a button to have the Template Design sidebar appear (I could provide this bit)
* If a JSON file with the same name as the document exists then it will populate a drop down in the sidebar.
**This JSON file will have the names of the properties which would come from the Survey prior to downloading the document.
* The user would select some text within the document and click a button in the sidebar.
* If they had a property selected then they would have the property name filled out from that name
* ELSE they would be able to either:
** Take a suggested name which would be calculated from the context of the area selected
** Input their own name
** A suggested name would be calculated from:
*** A title immediately proceeding the paragraph which was highlighted
*** A sentence immediately prior to the text highlighted
*** The text selected
* In all cases the suggested name would be:
** Text lower cased
** Spaces would be converted to _undercores_
*** E.g. loan_amount , counterparty_name
* Default Text would be a multi-line control which contains the text selected and allows the user to change it to be more in line with the change from a working document to a template.
* I think it makes sense to allow the user to choose a colour for the content control
* I’m not sure which of the other aspects of content controls need to be settable through the form, e.g. Tags
* Once set, the user clicks a button and the document is updated with the Content Control
* If the user clicks on an existing Content Control then all the aspects of that content control should appear available to edit
* If it is easy to be able to find all instances of the same text and have them replaced within the document with the control then to provide a button to achieve this seems like a sensible request.
Some additional pieces: (which you can price separately)
Provide code to demonstrate how to replace update these content controls with custom text through the CustomXMLPart being updated.
A method to strip out the Content Controls – effectively “harden” the text within the document so that the CustomXMLPart cannot be used to update it further.