Vba 如何在Excel 2010(在文件功能区和快速访问栏中)中禁用“保存并发送”?
我尝试将我的文件myfile.xlsb重命名为myfile.zip,然后打开zip存档,在其中创建文件夹customUI,将包含数据的文件customUI.xml放入该文件夹Vba 如何在Excel 2010(在文件功能区和快速访问栏中)中禁用“保存并发送”?,vba,excel,ribbon,commandbar,Vba,Excel,Ribbon,Commandbar,我尝试将我的文件myfile.xlsb重命名为myfile.zip,然后打开zip存档,在其中创建文件夹customUI,将包含数据的文件customUI.xml放入该文件夹 <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <backstage> <tab idMso="TabSha
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<backstage>
<tab idMso="TabShare" visible="false"/>
</backstage>
</customUI>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<officeMenu>
<menu idMso="FileSendMenu" enabled="false"/>
</officeMenu>
</ribbon>
</customUI>
我需要禁用这个并从VBA控制它
Control Name: SendCopySendToMailRecipient ; FileEmailAsPdfEmailAttachment ; FileEmailAsXpsEmailAttachment ; SendUsingEmail ; GroupSendUsingEmail
Control Type: toggleButton ; button ; button ; task ; group
Tab Set: None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Backstage View) ; None (Backstage View)
Tab: None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; TabShare ; TabShare
Group: - ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; GroupShare ; GroupShare
Parent Control: - ; FileSendMenu ; FileSendMenu ; Share ; Share
Secondary Parent Control: - ; - ; - ; - ; SendUsingEmail
Policy ID: 3738 ; 15730 ; 15731 ; 18209 ; 18166
Ordering: 645 ; 1049 ; 1050 ; 2219 ; 2220
这几乎隐藏了一切-可能有助于:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<qat>
<documentControls>
<control
idMso="WindowSwitchWindowsMenuExcel"
screentip="SWITCH EXCEL FILE"
supertip="Click here to switch from this workbook to another open excel file."/>
<control
idMso="FilePrint"
screentip="PRINT FILE"
supertip="Click here to enable the print menu."/>
</documentControls>
</qat>
</ribbon>
</customUI>
是的,但是文件->保存和发送仍然存在,足以删除bitI只需要这个!!!但不是全部
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Send To").Enabled = False
Application.CommandBars("Worksheet Menu Bar").Controls("File").Controls("Save & Send").Enabled = False
Control Name: SendCopySendToMailRecipient ; FileEmailAsPdfEmailAttachment ; FileEmailAsXpsEmailAttachment ; SendUsingEmail ; GroupSendUsingEmail
Control Type: toggleButton ; button ; button ; task ; group
Tab Set: None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Backstage View) ; None (Backstage View)
Tab: None (Not in the Ribbon) ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; TabShare ; TabShare
Group: - ; None (Not in the Ribbon) ; None (Not in the Ribbon) ; GroupShare ; GroupShare
Parent Control: - ; FileSendMenu ; FileSendMenu ; Share ; Share
Secondary Parent Control: - ; - ; - ; - ; SendUsingEmail
Policy ID: 3738 ; 15730 ; 15731 ; 18209 ; 18166
Ordering: 645 ; 1049 ; 1050 ; 2219 ; 2220
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<qat>
<documentControls>
<control
idMso="WindowSwitchWindowsMenuExcel"
screentip="SWITCH EXCEL FILE"
supertip="Click here to switch from this workbook to another open excel file."/>
<control
idMso="FilePrint"
screentip="PRINT FILE"
supertip="Click here to enable the print menu."/>
</documentControls>
</qat>
</ribbon>
</customUI>