English 中文(简体)
MS Office Excel Ribbon - Cannot change/hide Editing group in Home tab
原标题:

I have a .net addin for Excel. The addin creates the Ribbon UI for Excel 2007 and re-purposes some existing commands such as Cut, Copy, Paste, Sort etc.

For Cut, Copy and Paste I am just overriding their OnAction value to call my own procedure when the buttons are clicked. But for Sort, Sort Asc and Sort Desc commands the case is a little different. When either of the Sort, Sort Asc or Sort Desc buttons are clicked, I want to get notified and then call the default functionality. This was possible in Excel 2003 commandsbars by calling the Execute() method on the CommandBarControl.

In Excel 2007, there is a ExecuteMso() method to programmatically click a ribbon element but when the OnAction is overridden, this ExecuteMso() method just executes my own procedure and not the default functionality of that button.

So I thought that I will HIDE the Sort buttons in the "Editing" group in Home tab and add my own Sort, Sort Asc and Sort Desc buttons to it. The buttons will call into my procedure first from where I will call the default behavior.

Now the problem is that I am unable to change/hide the Editing group (idMso="GroupEditing"). Is this built-in group not editable? I can however HIDE the Clipboard and other groups(but can t add buttons to them).

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab idMso="TabHome">        
        <group idMso="GroupEditing" visible="false" />
      </tab>
    </tabs>
  </ribbon>
</customUI>
最佳回答

I think the idMso is incorrect in relation to hiding the Editing group.

idMso="GroupEditingExcel"

问题回答

暂无回答




相关问题
Building a Com addin for Office 2000 / Office 2007

I am struggling to find a straight forward guide to creating office addins using VSTO and VB.net. Specifically I would like to know how to be able to create a addin/ dll which can either be ...

Excel COM Add-In dialog interrupts script

I have written an Excel COM Add-In in C++ for automation of Excel with VBA. It contains an own dialog showing some general informations about the Add-In. Now i create a button in Excel that opens the ...

Will visual studio 2010 express support addins?

I know vs2008 express didn t. I m hoping this will change with vs2010. Anyone know? Link me? Edit: Anyone have a primary source? While "As far as I know" answers can be helpful, in this case it ...

VSTO 3.0 Excel 2007 Addin Tab doesn t display

This is a very odd problem I ve found. I have written and successsfully deployed a VSTO 3.0 Addin for Excel 2007. The problem is that the Tab for the Ribbon only shows up on NEW instances of Excel; ...

热门标签