Open Documents in Client Application Instead of Browser in SharePoint

Requirement: Enable Microsoft Word documents, Excel Spreadsheets, and PowerPoint Presentations to open in client applications like Microsoft Word, Excel, and PowerPoint instead of opening them in the browser directly.

How to open SharePoint documents in Browser instead of the client application?

When you configure Office Web Apps (or Microsoft Office Online Server) to handle Office documents like Word files, Excel spreadsheets, and PowerPoint presentations, they are set to open in Microsoft Office Online Server instead of their associated client applications. You can configure SharePoint document libraries to determine whether to open these files in the associated client program or Microsoft Office Online Server. In SharePoint, you can enable open documents 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 the “Advanced Settings” link
  • Under “Opening Documents in the Browser”, choose “Open in the client application”
    sharepoint 2013 open document in application
  • Click “OK” to save your changes. 

Activate “Open Documents in Client Applications by Default” Feature:

While the above setting sets the document opening behavior at the specific document library, we have a built-in SharePoint 2013 feature called “Open Documents in Client Applications by Default” to control this behavior at the site collection level. 

To activate this feature:

  • Go to Site Settings >> Site Collection Features
  • Click on the “Activate” button next to the “Open Documents in Client Applications by Default” featuresharepoint 2013 open document in client application

Once you enable the “Open Documents in Client Applications by Default” feature at the site collection level, any new document library will follow the setting of “Open in the Client application.” However, this setting needs to be changed for all existing document libraries in the site collection!

Definitely, you don’t want to do it manually for each and every document library in the site collection, isn’t it? Let’s do PowerShell.

PowerShell script to change document open behavior:

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

#Site Collection URL
$SiteUrl = ""

#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"
        Write-Host "Updated Document Library Settings on $($web.URL+"/"+$Library.RootFolder.URL)”

This sets all documents in SharePoint 2013 to open a document in client applications. If you want to turn off Office web apps integration with SharePoint, refer: How to disable office web apps in SharePoint 2013?

To make documents to open in client applications in SharePoint Online, refer SharePoint Online: PowerShell to Set “Open in Client Application”

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “Open Documents in Client Application Instead of Browser in SharePoint

  • but for sharepoint online can make the same thing or is impossible thanks in advance


Leave a Reply

Your email address will not be published. Required fields are marked *