Is it possible to remove all the default Sharepoint 'Save As' Options in O365?
Yes it is. One way is to enumerate the Registry-keys that is used for Sharepoint for the user and set them to NotConnected and NoCapabilities. This VBScript does the trix.
'On Error Resume Next
'=========================================================
'Remove any SHAREPOINT "Save As" Default Options in Office
'If it works, created by: 'Created by Tom Jorgensen
'If it do not work, I donno who wrote this
'18:23 09.11.2016
'=========================================================
Const HKEY_CURRENT_USER = &H80000001
strKeyPath = "Software\Microsoft\Office\16.0\Common\ServicesManagerCache\Identities"
Set objShell = CreateObject("WScript.Shell")
Set reg = GetObject("winmgmts://./root/default:StdRegProv")
EnumerateKeys HKEY_CURRENT_USER, strKeyPath
Sub EnumerateKeys(hive, key)
reg.EnumKey hive, key, arrSubKeys
If Not IsNull(arrSubKeys) Then
For Each subkey In arrSubKeys
If InStr(subkey, "O365_SHAREPOINT") Then
'wscript.echo "Removing Save As Option for: HKEY_CURRENT_USER\" & key & "\" & subkey
strkeyvalue = objShell.regread ("HKEY_CURRENT_USER\" & key & "\" & subkey & "\ConnectionState")
If strkeyvalue = "1" then
objShell.RegWrite "HKEY_CURRENT_USER\" & key & "\" & subkey & "\ConnectionState", 0, "REG_DWORD"
objShell.RegWrite "HKEY_CURRENT_USER\" & key & "\" & subkey & "\EnabledCapabilities", 0, "REG_DWORD"
End If
End If
EnumerateKeys hive, key & "\" & subkey
Next
End If
End Sub
'On Error Resume Next
'=========================================================
'Remove any SHAREPOINT "Save As" Default Options in Office
'If it works, created by: 'Created by Tom Jorgensen
'If it do not work, I donno who wrote this
'18:23 09.11.2016
'=========================================================
Const HKEY_CURRENT_USER = &H80000001
strKeyPath = "Software\Microsoft\Office\16.0\Common\ServicesManagerCache\Identities"
Set objShell = CreateObject("WScript.Shell")
Set reg = GetObject("winmgmts://./root/default:StdRegProv")
EnumerateKeys HKEY_CURRENT_USER, strKeyPath
Sub EnumerateKeys(hive, key)
reg.EnumKey hive, key, arrSubKeys
If Not IsNull(arrSubKeys) Then
For Each subkey In arrSubKeys
If InStr(subkey, "O365_SHAREPOINT") Then
'wscript.echo "Removing Save As Option for: HKEY_CURRENT_USER\" & key & "\" & subkey
strkeyvalue = objShell.regread ("HKEY_CURRENT_USER\" & key & "\" & subkey & "\ConnectionState")
If strkeyvalue = "1" then
objShell.RegWrite "HKEY_CURRENT_USER\" & key & "\" & subkey & "\ConnectionState", 0, "REG_DWORD"
objShell.RegWrite "HKEY_CURRENT_USER\" & key & "\" & subkey & "\EnabledCapabilities", 0, "REG_DWORD"
End If
End If
EnumerateKeys hive, key & "\" & subkey
Next
End If
End Sub