Tuesday 30 September 2014

Force Browser to save office files locally

if you are stuck like me and trying to find a solution to force browsers to only save office documents (word and excel) locally and not try to open in browser follow the steps below:


$webApplication = Get-SPWebApplication "http://localhost"
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/msword")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.ms-word.document.12")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
$webApplication.Update()

No comments:

Post a Comment