Вопрос

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?

Это было полезно?

Решение 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

Другие советы

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()

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top