Question

In my organization we have many Sharepoint sites for different products that basically mirror each other in structure. We have a document library in each of these sites with a custom template. The template is the same for each site.

Occasionally the template needs to be updated. This can be accomplished through the Web interface but it is very tedious with so many sites. I need a way to programatically upload a new template file to the Forms subdirectory of each document library without using the object model. I do not have access to the server itself.

I have already tried to do a simple HTTP PUT but this fails, even though I can upload to the library itself in this way. Is this possible through the Web Services interface or by some other method?

Was it helpful?

Solution

If you are willing to do a one time tedious job:

  • Create a content type at the Home Page (site collection level). Home -> all settings -> site content types.
  • Set it to utilize your template by going to advanced settings.
  • You can either upload your template here which means you will have to come back here to edit it or you can upload it to a document library at the top level and copy and paste the link. (from testing uploading elsewhere and copying the link seems to work slightly better)
  • Enable the management of content types in all document libraries. Document library settings -> advanced settings -> enable mangement of content types.
  • Apply that content type as the default to all of the document libraries.

Now whenever you edit the template at the top level all the changes will flow down.

NOTE: If you go this route please test on a couple document libraries to ensure it works before going through all of them.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top