2

I set up Office Web Apps. I can view documents successfully. We only want to use Office Web Apps for viewing only.

I ran the following commands to hide Office Web Apps New and Edit functionality:

#Excel Edit
New-SPWOPISuppressionSetting -Extension XLSM -Action edit
New-SPWOPISuppressionSetting -Extension XLSX -Action edit
New-SPWOPISuppressionSetting -Extension XLSB -Action edit
New-SPWOPISuppressionSetting -Extension ODS -Action edit

#Excel New Document
New-SPWOPISuppressionSetting -Extension XLSX -Action editnew

#PowerPoint Edit
New-SPWOPISuppressionSetting -Extension PPSX -Action edit
New-SPWOPISuppressionSetting -Extension PPTX -Action edit
New-SPWOPISuppressionSetting -Extension ODP -Action edit

#PowerPoint New Document
New-SPWOPISuppressionSetting -Extension PPTX -Action editnew
New-SPWOPISuppressionSetting -Extension ODP -Action editnew

#Word Edit
New-SPWOPISuppressionSetting -Extension DOCX -Action edit
New-SPWOPISuppressionSetting -Extension ODT -Action edit
New-SPWOPISuppressionSetting -Extension DOCM -Action edit

#Word New Document
New-SPWOPISuppressionSetting -Extension DOCX -Action editnew
New-SPWOPISuppressionSetting -Extension ODT -Action editnew
New-SPWOPISuppressionSetting -Extension DOCM -Action editnew

#OneNote Edit
New-SPWOPISuppressionSetting -Extension ONE -Action edit
New-SPWOPISuppressionSetting -Extension ONETOC2 -Action edit
New-SPWOPISuppressionSetting -ProgId "OneNote.Notebook" -Action edit

#OneNote New Document
New-SPWOPISuppressionSetting -Extension ONE -Action editnew
New-SPWOPISuppressionSetting -Extension ONEPKG -Action editnew
New-SPWOPISuppressionSetting -ProgId "OneNote.Notebook" -Action editnew

# Set default action to View
Get-SPWOPIBinding -Action "view" -Application "Word"| Set-SPWOPIBinding -DefaultAction
Get-SPWOPIBinding -Action "view" -Application "Excel"| Set-SPWOPIBinding -DefaultAction
Get-SPWOPIBinding -Action "view" -Application "PowerPoint"| Set-SPWOPIBinding -DefaultAction
Get-SPWOPIBinding -Action "view" -Application "OneNote"| Set-SPWOPIBinding -DefaultAction

Unfortunately, When I click New Document, I still get the Office Web Apps selector

New Document Menu

and I get this error when a document is selected and document name is entered:

OWA New Document Error

I have also tried setting "Open in Client Application" but the new document functionality remains the same.

Enabling content types on the document library restores the original 'upload' functionality of the ' + New Document' button however setting that for every library is not feasible. Please see the upload behavior of the ' + New Document' button below.

Original New Document upload

What do I need to do to restore the original New Document functionality?

  • have to tried to set the default action for word document as view only? Get-SPWOPIBinding -Action "view" -Application "Word"| Set-SPWOPIBinding -DefaultAction – Waqas Sarwar MVP Mar 24 '16 at 13:53
  • No change, thanks for the suggestion though! – James Grizzle Mar 24 '16 at 14:38
  • it wont allow u to view the documents? – Waqas Sarwar MVP Mar 24 '16 at 14:38
  • Viewing works GREAT. The issue only appears on the ' + New Document' button that appears directly within the library (NOT on the ribbon). – James Grizzle Mar 24 '16 at 16:01
  • What do you call 'original New Document functionality'? What behavior would you like to get? – Aziz Kabyshev Apr 4 '16 at 19:00
2
+100

As far as I'm aware what you have discovered is the only way around this issue. As soon as you add even a single WOPI binding (even just view) your new button behavior is replaced. You can try this by removing all bindings and checking the library, then just enabling view for say an Excel sheet. Those document options will pop right back up.

As far as enabling the management of content types in bulk you can script this behavior with something like this

$site = Get-SPSite http://portal;
$webs = $site | Get-SPWeb -Limit all;
$webs | ForEach-Object {
     $library = $_.Lists | where { $_.BaseTemplate -eq "DocumentLibrary" };
     $library | ForEach-Object {   
        $_.ContentTypesEnabled = $true         
     }
 }
 $site.Dispose()
  • Thanks for your answer! The reason that I think it isn't a feasible solution is that people are creating new sites and libraries all the time. – James Grizzle Apr 7 '16 at 13:23
  • It's not optimal that's for sure. you could run it as a scheduled task daily (or hourly, based on your needs). If you have a lot of sites, you can break it up so only a portion of the sties are checked/updated at different times based on a schedule. – Jesus Shelby Apr 7 '16 at 15:59
  • It turns out that fixing this is possible. Please see my answer below. – James Grizzle May 11 '16 at 19:12
2

Looks like this is actually possible. You need to activate SPUserLicensing and then apply the available licenses to your AD groups. See this post from Wictor Wilen for details.

Enable-SPUserLicensing

#Mapping for Windows Authentication
$ADmapping = New-SPUserLicenseMapping -SecurityGroup "Enterprise Users" -License Enterprise
$ADmapping | Add-SPUserLicenseMapping


#Mapping for ADFS Authentication given that claims mappings for groups are mapped 
#to the unqualified domain such as: DOMAIN\ADuserGroup and the provider name is adfs
$cpm = [Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager]::Local

$groupString = "c:0-.t|adfs|DOMAIN\AdUserGroup"
$groupClaim = $cpm.DecodeClaim($groupString)
$employeesMapping = New-SPUserLicenseMapping -Claim $groupClaim -License Enterprise
$employeesMapping | Add-SPUserLicenseMapping
0

How about the default open preference setting specified at the end of this article: https://technet.microsoft.com/en-us/library/ee837425.aspx

If you inspect the "Word Document" element in your first screenshot and look at the containing tag's onclick event you'll see that DefaultItemOpen=1 is forcing Web Apps. The powershell script mentioned in the MSDN link above should fix that.

DefaultItemOpen=1&Source=...p;TemplateType=1", OnCloseDialogNavigate); return false

  • Thanks for answering! The documents already open in OWA, which is exactly what I want. I'm only trying to change the New Document button behavior. – James Grizzle Apr 5 '16 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.