If you are using the Enterprise Edition of SharePoint 2010 and have configured Excel Services, you may often run into the issue where the Excel documents in a document library start opening in the browser by default. Most of the time, this is not an ideal option as Excel files may contain macros that are not supported by Excel Services and users will see errors when trying to access these files. You can change the default open behavior of the documents so that they open in the client application (e.g., Microsoft Excel) by using one of the following options:
- Document Library Level
You can change the default open behavior for a document library by going to Document Library Settings –> Advanced Settings –> Open Documents in the Browser and select “Open in the Client Application” from the options. Select “OK” to apply the changes.
- Site Collection Level
The feature “Open Documents in Client Applications by Default” is a site collection feature that can be activated in order to change the default document open behavior to “Open in the client application”. This change is applied to all the document libraries of the site. What a relief!!! To enable this feature, go to Site Settings –> Site Collection Features and look for the feature titled “Open Documents in Client Applications by Default”. Select “Activate” to activate this feature. Once activated, you will see “Active” next to the feature description.
- SharePoint 2010 Management Shell
You can utilize SharePoint 2010 Management Shell to activate this feature in more than one site collection at a time. All you need is copy the following script in notepad, save it as a .PS1 extension and launch it from SharePoint 2010 Management Shell. Make sure to remove the line numbers:
1: $defaultOpenBehaviorFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OpenInClient"}).Id
2: Get-SPSite "http://hostname/*" -limit ALL |foreach{ Enable-SPFeature $defaultOpenBehaviorFeatureId -url $_.URL }
If later on, you decide to disable this feature in bulk, you can use the following script:1: $defaultOpenBehaviorFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OpenInClient"}).Id
2: Get-SPSite "http://hostname/*" -limit ALL |foreach{ Disable-SPFeature $defaultOpenBehaviorFeatureId -url $_.URL }
Hope it makes management little easier.
No comments:
Post a Comment