Friday, July 19, 2013

Configure the default open behavior for documents in SharePoint

In SharePoint, you can configure whether browser-enabled documents are opened in a client application or in the browser. By default, when Office Web Apps is installed, Office documents will open in the browser. You can override this setting using the SharePoint OpenInClient feature. The OpenInClient feature can be configured in site collection administration or by using the SPFeature cmdlet in Windows PowerShell.
How documents open in SharePoint varies depending on whether the OpenInClient feature is present, and either enabled or disabled:
  • If the OpenInClient feature is not present and Office Web Apps is not installed, documents will open in the client application (SharePoint default).
  • If the OpenInClient feature is not present, Office Web Apps is installed and Office Web Apps service applications are activated, documents will open in the browser (Office Web Apps default).
  • If the OpenInClient Feature is present and enabled, and Office Web Apps service applications are activated, documents will open in the client application.
  • If the OpenInClient Feature is present and disabled, and Office Web Apps service applications are activated, documents in will open in the browser.


    To set the default open behavior for site collections

    1. In the SharePoint site collection, click Site Actions, and then click Site Settings.
    2. On the Site Settings page, under Site Collection Administration, click Site Collection Features.
    3. On the Features page, for the Open Documents in Client Applications by Default feature, click Activate (OpenInClient Feature is enabled) to open documents in the client application. Click Deactivate (OpenInClient Feature is disabled) to open documents in the browser.

    To set the default open behavior for a document library by using the document library settings page

    1. On the : All Documents page, under Library Tools, click Library.
    2. In the library toolbar, click Library Settings.
    3. On the Document Library Settings page, click Advanced Settings.
    4. On the Advanced Settings page, in Opening Document in the Browser, select one of the following options:
      Open in the client application   When a user clicks on a document in this library, the document will open in the corresponding client application (if available).
      Open in the browser   When a user clicks on a document in this library, the document will open in the Web browser Web app for that document type. When the document is opened in the Web app, the user can then decide to open the document in the client application
      Use the server default   When a user clicks on a document in this library, the document will open by using the default open behavior specified for the server on which SharePoint 2010 Products is installed.

    To set the default open behavior for IRM protected document libraries by using Windows PowerShell

    1. Using Notepad, open a new text file and then copy and paste the following script into the file.
      The following example sets the default open behavior for IRM protected document libraries in all sites to open in their associated client application (if available).

      Get-SPWeb -site http://contoso | % {$_.Lists} | where {$_.IrmEnabled -eq $true} | % {$_.DefaultItemOpen =[Microsoft.Sharepoint.DefaultItemOpen]::PreferClient; $_.Update()}
       
    2. Specify the following parameters:
      Parameter Value
      –site URL
    3. Save the file with a .ps1 file name extension to a folder where you run scripts (typically C:\scripts).
    4. In the Windows PowerShell console, at the command prompt (that is, PS C:\>), type the following command and press ENTER:
      C:\\.ps1
     Reference:







No comments:

Post a Comment