Pregunta

I cannot extend Office 2010 UI even when I use the code from MSDN. This is the code I think should work:

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <backstage>
    <tab idMso="TabShare">
      <firstColumn>
        <taskFormGroup idMso="GroupShare">
          <category idMso="FileTypes">
            <task id="tskExportXmlCms" label="Exportovat jako XML">
              <group id="grpExportXmlCms" label="Exportovat jako XML">
                <topItems>
                  <button id="btnExportXmlCms" label="Exportovat jako XML" onAction="OnExportXmlCms" />
                </topItems>
              </group>
            </task>
          </category>
        </taskFormGroup>
      </firstColumn>
    </tab>
  </backstage>
</customUI>

public void OnExportXmlCms(IRibbonControl control) { }

When I add Ribbon (Visual Designer) I can see added items. When I use Ribbin (XML) I'm not able to see anything in the backstage. What is wrong?

¿Fue útil?

Solución

There was missing this method:

public partial class ThisAddIn {
    protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject() {
        return new Ribbon();
    }
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top