J
james
I've looked at MS's and Whitechapel's code, but I can't seem to get it
right. I was hoping someone could see what I am doing wrong..
----- In the ribbon class:
namespace ARisk_Reporting
{
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IExposedMethods
{
void RefreshAlllPivots(Excel.Workbook wkb);
void RefreshThisPivot(Excel.PivotTable pvt);
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
public partial class ARISK_Ribbon : OfficeRibbon, IExposedMethods
{
----- Class includes two public methods:
public void RefreshAlllPivots(Excel.Workbook wkb)
{
public void RefreshThisPivot(Excel.PivotTable pvt)
{
----- ThisAddIn code:
private ARISK_Ribbon ribbon;
protected override object RequestComAddInAutomationService()
{
if (ribbon == null)
{
ribbon = new ARISK_Ribbon();
}
return ribbon;
}
right. I was hoping someone could see what I am doing wrong..
----- In the ribbon class:
namespace ARisk_Reporting
{
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IExposedMethods
{
void RefreshAlllPivots(Excel.Workbook wkb);
void RefreshThisPivot(Excel.PivotTable pvt);
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
public partial class ARISK_Ribbon : OfficeRibbon, IExposedMethods
{
----- Class includes two public methods:
public void RefreshAlllPivots(Excel.Workbook wkb)
{
public void RefreshThisPivot(Excel.PivotTable pvt)
{
----- ThisAddIn code:
private ARISK_Ribbon ribbon;
protected override object RequestComAddInAutomationService()
{
if (ribbon == null)
{
ribbon = new ARISK_Ribbon();
}
return ribbon;
}