#1
|
|||
|
|||
Content Control content deleted when re-uploading to SharePoint
I've got several dozen MS Word documents that originated from a library on SharePoint 2013. There are extensive Content Controls in the docs that are linked to list columns in the doc library.
After downloading, sending to a client, and receiving them back, when I try to put the files back to the original library on SharePoint, all of the Content Control content is deleted. To be clear: the Content Control fields themselves remain intact; it's just the text they used to contain that's gone. When I view the files locally, all of the Content Control fields are intact -- it's only when I move the file back to SharePoint that they disappear. Any idea what might be going on here and how I might resolve the issue? Thanks. |
#2
|
||||
|
||||
This can get ugly in a hurry. The CCs sound like they are linked to document properties that are being wiped by Sharepoint. It is possible that this is happening because you may have upgraded your Sharepoint version or the document properties have been changed in some way which causes Sharepoint to overwrite them instead of importing them.
I would compare the xml files embedded in the docx files before and after they get wiped to see if you can spot a critical difference. You may be able to adjust that namespace or schema to match the xml that Sharepoint inflicts on the file coming in. Do you know how to get at the custom xml files in Word? Did your client load the files into their Sharepoint site before sending the files back?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
It looks like the client somehow stripped the properties out. None of the SP library column-based custom document properties remain. I will compare the XML to see if I can fix the links. Thanks.
|
#4
|
||||
|
||||
Your client probably did this inadvertently by using the 'safe saving' of the Document Inspector. You can explore this by going to File > Options > Trust Center > Trust Center Settings > Privacy Options > Document Inspector > Custom XML Data.
I would expect that by putting the file back into Sharepoint you have reinserted the xml file which but at that time the fields are empty by default so the CCs then go back to showing the field contents again of the text they were previously displaying. You could create a macro to harvest the contents of each CC and what their xpath mapping is. That might enable you to recreate the xml file in its entirety. I find this pretty complex to code so it would be easier to harvest the info in the CCs and then, after you have reinserted the xml by putting the file into Sharepoint, refilling the CCs with your harvested values to repopulate the xml indirectly.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
Good to know re: "safe saving" -- I'll check in with the client about that; thanks.
In the meantime, I put together a macro to paste the client's redlines back into older "receiver" documents that are still recognized by the document library and contain intact CCs. Fortunately, based on the layout, it was pretty easy to work around the CCs. |
#6
|
||||
|
||||
That would work. You could also extract the two relevant custom xml files from the good source and embed them into the customer returned files for the same result. The two xml files that sharepoint adds is the one containing the document management element and the big schema that describes those fields. The schema itself isn't 'necessary' for the CCs to reattach but it allows the 'fields' to be selected in the Insert > Document Property dropdown.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
One Content Control Checkbox checks another Content Control Checkbox | DEsh | Word VBA | 2 | 10-06-2017 08:23 PM |
Clicking the selected Content Control checkbox returns wrong control in vba event | DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |
When content controls are deleted, my macro does not work as I would like. | harry.ayre | Word VBA | 2 | 02-23-2015 10:35 AM |
Uploading a document to SharePoint 2007 by email | bremen22 | Misc | 0 | 05-28-2014 07:36 AM |
Deleting a table from a content control -- preserving the content control | BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |