In this article we will be seeing how to enable Sync to SharePoint Workspace button in the ribbon interface for SharePoint document libraries so that the documents can be synced to SharePoint Workspace and the users can work from offline. Enable Sync to SharePoint Workspace using UI:
Enable Sync to SharePoint Workspace using SharePoint Object Model:
namespace EnableSharePointWorkspace { class Program { static void Main(string[] args) { using (SPSite site = new SPSite("https://servername:1111/sites/ContentTypeHub/")) { using (SPWeb web = site.OpenWeb()) { SPList list = web.Lists.TryGetList("Shared Documents"); if (list != null) { //Enable Sync to SharePoint Workspace list.ExcludeFromOfflineClient = false; //To Disable Sync to SharePoint Workspace => list.ExcludeFromOfflineClient = true; list.Update(); Console.WriteLine("Sync to SharePoint Workspace is Enabled"); } else { Console.WriteLine(list.Title + " does not exists in the site"); } Console.ReadLine(); } } } } }
Enable Sync to SharePoint Workspace using Powershell:
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: