Requirement: Enable Microsoft Word documents, Excel Spread sheets and PowerPoint Presentations to open in client applications like Microsoft Word, Excel and PowerPoint instead of opening them in browser directly.
Solution:
In SharePoint 2013, you can enable open document in applications by configuring an option in document library settings.
While the above setting sets the document opening behavior at the specific document library, we've a built-in SharePoint 2013 feature called "Open Documents in Client Applications by Default" to control this behavior at site collection level.
To Activate this feature:
Definitely, you don't want to do it manually for each and every document library in the site collection, isn't it? Lets do PowerShell.
PowerShell script to change document open behavior:
Related post: How to disable office web apps in SharePoint 2013
Solution:
In SharePoint 2013, you can enable open document in applications by configuring an option in document library settings.
- Navigate to the Library >> Click on "Library Settings" from the Ribbon
- Under General Settings, Click on "Advanced Settings" link
- Under "Opening Documents in the Browser", choose "Open in the client application"
- Click "OK" to save your changes.
While the above setting sets the document opening behavior at the specific document library, we've a built-in SharePoint 2013 feature called "Open Documents in Client Applications by Default" to control this behavior at site collection level.
To Activate this feature:
- Go to Site Settings >> Site Collection Features
- Click on "Activate" button next to "Open Documents in Client Applications by Default" feature
Definitely, you don't want to do it manually for each and every document library in the site collection, isn't it? Lets do PowerShell.
PowerShell script to change document open behavior:
sAdd-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinueThis sets all documents in SharePoint 2013 to open document in client applications.
#Site Collection URL
$SiteUrl = "http://intranet.crescent.com"
#Get All sites under given site collection
$WebsColl = Get-SPSite $SiteURL -Limit All | Get-SPWeb -Limit All
#Iterate through each site
foreach($web in $WebsColl)
{
#Get All document libraries
$LibrariesColl =$web.Lists | where {$_.BaseType -eq "DocumentLibrary" -and $_.BaseTemplate -eq "DocumentLibrary"}
foreach($Library in $LibrariesColl)
{
#Set Document Open behavior
$Library.DefaultItemOpen = "PreferClient"
$Library.Update()
Write-Host "Updated Document Library Settings on $($web.URL+"/"+$Library.RootFolder.URL)”
}
}
Related post: How to disable office web apps in SharePoint 2013