Saturday, August 2, 2014

Disable Office Web Apps and Enable Open Documents in Client Application in SharePoint

Requirement: Clicking on a documents in a SharePoint 2013 document library, opens the document directly in browser, Where SharePoint 2013 farm is configured to use Office Web apps. End-users wants to open office documents client applications such as Microsoft word, Excel, etc rather opening them in browser.

Solution:
Well, This behavior can be changed at following levels:

  • Disable office web apps in SharePoint 2013 for entire farm.
  • Disable Office Web Apps for a particular File type.
  • Enable opening documents in client applications at Site collection level.
  • Change office documents opening behavior in SharePoint document library settings.
Disable office web apps in SharePoint 2013 for entire farm.
Go to your SharePoint WFE or Application server and open the SharePoint management shell, Run these below PowerShell commands:
  1. If you want to disable office web apps for your entire SharePoint environment, You can disconnect Office web apps farm from SharePoint by removing binding:
    Remove-SPWOPIBinding -all $true
  2. Disable Office Web Apps for a particular File type.
    If you want to remove "PDF Previews" in browser, you can:
    Remove-SPWOPIBinding -Extension "PDF"

Enable/Disable opening documents in client applications at Site collection level.
You can change the default behavior of opening the documents in browser to Opening them in Office client application by activating the feature "Open Documents in Client Application by Default" at site collection level. Here are the steps:
  • Log into SharePoint site >> Go to Site Settings.
  • Click Site collection features under Site Collection Administration section.
  • Activate "Open Documents in Client Application by Default" feature
This feature suppresses Office Web Apps in SharePoint 2013 site collection.
enable open documents in client application to Disable Office Web Apps in SharePoint
Click on "Ok". After changing this setting, when users click the document in SharePoint site, it will be opened with Office client application by default. These steps remains same to disable office web apps in SharePoint online as well.

PowerShell script to Enable "Open in Client" Feature:
Enable-SPFeature 8A4B8DE2-6FD8-41e9-923C-C7C3C00F8295 -url <SiteCollURL>

To Disable "Open in Client" feature which enables Office web apps (if installed and integrated with SharePoint, BTW!):
Disable-SPFeature 8A4B8DE2-6FD8-41e9-923C-C7C3C00F8295 -url <SiteCollURL>
To enable this feature on all site collections:
Get-SPSite -limit ALL |foreach{ Enable-SPFeature 8A4B8DE2-6FD8-41e9-923C-C7C3C00F8295 -url $_.URL }

Change office documents opening behavior in SharePoint document library settings
You can set the default behavior for open documents either in client application or in office web apps at document library level. Here is how to disable Office web apps by changing document library settings:
  • Navigate to the SharePoint document library >> Click on "Library Settings" icon from Library tab of the ribbon.
  • In library settings page, Click on "Advanced Settings" under general settings group.
  • In Advanced Settings page, scroll-down and go to the "Opening Documents in the Browser" section to choose the default behavior.
  • To open documents in the client application, select Open in the client application.
enable open documents in client application
The default setting is "Use the server default".

Disable office web apps in SharePoint 2010:
In SharePoint 2010 days, After installing office web apps, You got to enable/disable office web apps feature from site settings. Same can be done with PowerShell as:
$WebAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id
$SiteCollection = Get-SPSite -Identity <<SharePoint-Site-URL>>
Disable-SPFeature $webAppsFeatureId -Url $SiteCollection.URL

However found its not working on SharePoint 2013 as the OWA architecture is completely revamped in its 2013 version. If you try to run the same code for SharePoint 2013, You get "Feature not activated in this scope" error!. More info: Deactivate the Office Web Apps Feature on a SharePoint site collection by using Windows PowerShell

Here is my step by step implementation guide to configure Office web apps for SharePoint 2010: Install and Configure Office Web Apps for SharePoint 2010



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...