Home

Copying word content into content controls in new word document

%3CLINGO-SUB%20id%3D%22lingo-sub-888038%22%20slang%3D%22en-US%22%3ECopying%20word%20content%20into%20content%20controls%20in%20new%20word%20document%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-888038%22%20slang%3D%22en-US%22%3E%3CP%3ECase%3A%3C%2FP%3E%3CP%3EI%20have%20several%20completed%20forms%20in%20word%20format.%20It%20basically%20a%20table%20that%20is%20filled%20in.%20Like%20so%3A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20501px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F135058iA3C2CA786ED6E037%2Fimage-dimensions%2F501x125%3Fv%3D1.0%22%20width%3D%22501%22%20height%3D%22125%22%20alt%3D%222019-10-02_08-16-59.jpg%22%20title%3D%222019-10-02_08-16-59.jpg%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20order%20to%20get%20the%20information%20from%20this%20form%20into%20sharepoint%20as%20metadata%20in%20a%20library%20i%20have%20added%20content%20controls%20to%20the%20template%2C%20that%20works%20well%20for%20new%20forms.%20Challenge%20is%20getting%20the%20old%20forms%20into%20sharepoint.%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20good%20way%20to%20merge%20old%20docs%20with%20new%20template%20to%20populate%20the%20content%20controls%3F%3C%2FP%3E%3CP%3EAlternatively%2C%20is%20there%20a%20way%20to%20ocr%20read%20the%20fields%20and%20populate%20sharepoint%20metadata%3F%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-888038%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-941848%22%20slang%3D%22en-US%22%3ERe%3A%20Copying%20word%20content%20into%20content%20controls%20in%20new%20word%20document%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-941848%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F279068%22%20target%3D%22_blank%22%3E%40FrodeH%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20complicated.%26nbsp%3B%20The%20content%20controls%20as%20you%20call%20them%20are%20added%20to%20documents%20by%20the%20SharePoint%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fprevious-versions%2Foffice%2Fdeveloper%2Fsharepoint-2010%2Faa544101(v%253Doffice.14)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eparser%3C%2FA%3E%20on%20upload%20to%20the%20library.%26nbsp%3B%26nbsp%3B%20This%20stamps%20the%20content%20type%20into%20the%20DOCX%20and%20makes%20the%20content%20control%20available%20in%20the%20DOCX%2C%20either%20through%20quick%20parts%20of%20the%20custom%20XML%20part.%20%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20think%20there%20is%20an%20easy%20way%20of%20adding%20the%20content%20type%20structure%20to%20your%20old%20docs%20(without%20uploading%20to%20SharePoint%20or%20building%20some%20custom%20code)%20-%20but%20I'm%20happy%20to%20be%20wrong%20on%20this.%3C%2FP%3E%3CP%3EThe%20trick%20is%20%3CU%3Emapping%3C%2FU%3E%20any%20old%20content%20controls%20to%20the%20actual%20quick%20parts%20that%20represent%20the%20content%20type%20fields.%20%26nbsp%3B%20This%20can%20be%20done%20programmatically%20but%20you%20need%20a%20dev%20that%20understands%20the%20OpenXML%20API.%3C%2FP%3E%3CP%3EIt%20can%20be%20more%20complicated%20again%20if%20using%20MMD%20fields%20and%20the%20Term%20Store%20as%20there%20a%20hidden%20list%20involved%20at%20the%20site%20level%20and%20the%20GUIDs%20need%20to%20match%20inside%20the%20DOCX.%20%26nbsp%3B%3C%2FP%3E%3CP%3EWe've%20solved%20similar%20problems%20in%20the%20past%20and%20unless%20you're%20looking%20to%20fix%20hundreds%20or%20thousands%20of%20docs%2C%20it%20might%20not%20be%20worth%20the%20effort%20to%20develop.%3C%2FP%3E%3CP%3EI%20hope%20this%20helps.%20%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
FrodeH
Occasional Contributor

Case:

I have several completed forms in word format. It basically a table that is filled in. Like so:2019-10-02_08-16-59.jpg 

In order to get the information from this form into sharepoint as metadata in a library i have added content controls to the template, that works well for new forms. Challenge is getting the old forms into sharepoint. 

Is there a good way to merge old docs with new template to populate the content controls?

Alternatively, is there a way to ocr read the fields and populate sharepoint metadata?

 
1 Reply

@FrodeH 

It is complicated.  The content controls as you call them are added to documents by the SharePoint parser on upload to the library.   This stamps the content type into the DOCX and makes the content control available in the DOCX, either through quick parts of the custom XML part.  

I don't think there is an easy way of adding the content type structure to your old docs (without uploading to SharePoint or building some custom code) - but I'm happy to be wrong on this.

The trick is mapping any old content controls to the actual quick parts that represent the content type fields.   This can be done programmatically but you need a dev that understands the OpenXML API.

It can be more complicated again if using MMD fields and the Term Store as there a hidden list involved at the site level and the GUIDs need to match inside the DOCX.  

We've solved similar problems in the past and unless you're looking to fix hundreds or thousands of docs, it might not be worth the effort to develop.

I hope this helps.  

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies