Remove Content Type for All Documents

Hi

We're using SharePoint Online and need to have the "content type" removed for all documents that have been saved locally to a computer.  For some reason the documents remember the content type, even when saved locally, and if that content type is available in a library they will pick up that one instead of the default content type for the new library location.

We would need to:

1. Copy all documents from SharePoint Online to a local computer location.

2. Delete the original documents from SharePoint Online.

3. On the local computer copy, we would need to somehow scrub the documents getting rid of whatever is causing them to remember the content type that they were originally given in SharePoint Online.

4. Copy the local documents back up to SharePoint Online into a library with a different default content type.

Any ideas?  Thanks!

September 14th, 2015 9:11am

I don't have an absolute answer for you, but I do have a few places for you to start looking or testing...

Edit the documents:

  • Open the downloaded document, click FILE, Info tab and in the Properties dropdown click Advanced Properties.
  • Click the Custom tab of the dialog box.
  • In the Properties list click "ContentTypeId" and then click Delete. (You may want to delete the "_dlc_policyId" item also as it contains the same Content Type ID (GUID))

Use PowerShell:

Use .Net and process the .docx file as a ZIP file:

  • No sample code for this one.. but rename a .docx file to .zip and the double click it. You will find a folder structure.
  • In my test document I found the content type listed in these files in that zip file: (search using the Content Type's GUID)
    \customXml\item3.xml
    \customXml\item4.xml
    \docProps\custom.xml

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 11:11pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics