Lots of customers I work with establish a requirement that files must be 'checked out' from SharePoint before they can be edited. This prevents multiple users from overwriting one another’s changes to files. The "check-out and check-in" functionality is a widely used in SharePoint and is just one of the many Enterprise Content Management features available in SharePoint 2010 and SharePoint 2007. For detailed steps on how to configure check-out and check-in functionality, please see the articles for SharePoint 2010 and SharePoint 2007

For those who are familiar with the concept, you'll know that when you check-out a file from a document library a dialog box appears asking if you want to "Use your local drafts folder" to temporarily store the file:

If the checkbox (shown in red, above) is selected, when you check-out a file it will place it on your local client/pc in My Documents. The other day a customer asked me how to disable/remove the "Use My Local Drafts Folder" checkbox that appears when checking out a document. They wanted to stop users storing documents locally.  Steps on how to do this are below.

How to use DisableLocalDrafts SharePoint project ( tested for SharePoint 2007 )

Please note that this is provided as a guided customization. It is not an official fix but it is an example of a customization that may provide some relief to the issue you are reporting. It is provided "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. And as with all customizations, the original code files should not be modified. If you choose to use the provided example you become responsible for the customization and are responsible for thoroughly testing this before putting it into a production environment.

The DisableLocalDrafts SharePoint project is for Microsoft Office SharePoint Server 2007 and has not yet been tested with Microsoft SharePoint Server 2010.  This project uses delegate controls to deploy a link to a custom JavaScript file to every page.  It does this by adding a UserControl to the AdditionalPageHead delegate control which is included in the OOTB master pages in SharePoint.  This is a Farm level solution.


Build Instructions

The DisableLocalDrafts SharePoint project was built using Visual Studio 2010 and WSP Builder 1.4.  The project should be opened with VS 2010 and can be compiled without WSP Builder.  However, to rebuild the WSP file, WSP builder will be needed or the developer can create the WSP manually.  This text does not cover how build WSP files by hand

Deploy Instructions:

1. Copy the compiled DisableLocalDrafts.wsp file to a server in the SharePoint farm

2. Open a command prompt ( elevated if running on Windows Server 2008 or 2008 R2 ) on a server in the SharePoint farm

3. Path to C:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\bin

4. Type the following command and press enter:
a. stsadm -o addsolution –filename <path to the wsp file>

5. Once completed, open Central Administration and click on the Operations tab

6. Click the link for Solution Management

7. Click the DisableLocalDrafts.wsp link and choose the Deploy Solution option

8. Choose a particular web application or deploy to all

9. Installation complete

Note: SharePoint will render the pages correctly even when an error occurs in the control.  Use the ULS logs for troubleshooting if the desired effect is not seen.

Files included:

  • DisableLocalDrafts.csproj :  Visual Studio project file                                                                                  
  • DisableLocalDrafts.snk : Signing key used to sign the project’s assembly                                                                                               
  • DisableLocalDrafts.wsp: Compiled working copy of the SharePoint solution that can be deployed.                                                                                              
  • SolutionID.txt :  ID of the SharePoint solution created. Include this file when building using WSP Builder                                                                                   
  • DisableLocalDrafts.dll:  Assembly built from the project
  • DisableLocalDrafts.pdb : Program database file used in debugging                                                                                        
  • Microsoft.SharePoint.Search.dll : Assembly added by WSP Builder                                                                                  
  • Microsoft.SharePoint.Search.xml : File added by WSP Builder                                                                                       
  • AssemblyInfo.cs : Assembly information for the project                                                                                                
  • DisableLocalDraftsUserControl.ascx :  User control used to place entry to customcore.js file on each page                                                                     
  • DisableLocalDraftsUserControl.ascx.cs                                        
  • DisableLocalDraftsUserControl.ascx.designer.cs                                              
  • elements.xml                           
  • feature.xml                                                                                                           
  • customcore.js  :  Javascript file that overrides a method in CORE.js and is used to disable the Local Drafts check box

I must give a big thanks to Tim Quinlan who shared the above code and steps.  

This article was authored by:


James Kemp
SharePoint Architecture Consultant
Microsoft Consulting Services UK

Click here to see my bio page