Getting unhanded exception on adx task pane manager

Add-in Express™ Support Service
That's what is more important than anything else

Getting unhanded exception on adx task pane manager
 
Subscribe
Amit B




Posts: 29
Joined: 2013-09-13
Steps:
1. Load addin
2. Open excel workbook 1 (w1)
3. Open workbook 2 (w2)
4. Close w1
4. Close w2 (exception)

Adx version: 8.7.4430.2005


System Info:
===========

AdditionalVersionIdentifier:
Start Time: 11/13/2018 10:11:55 AM
Professional: AddinExpress.XL.2005, Version=8.2.4371.2005, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Registered message WM_ADX_DESTROY_EMBEDED_WINDOW=49977
Registered message WM_ADX_READING_PANE_HIDE_FROM_SBCLS=49978
Registered message WM_ADX_READING_PANE_SHOW=49979
Registered message WM_ADX_READING_PANE_HIDE=49980
Registered message WM_ADX_READING_PANE_MINIMIZE=49981
Registered message WM_ADXDELPROC=49982
Registered message WM_ADXSETOLDPROC=49983
Registered message WM_ADXSETNEWPROC=49984
Registered message WM_ADXGETCONTAINERFORM=49985
Registered message WM_ADXADDFORM=49986
Registered message WM_ADXDELETEFORM=49987
Registered message WM_ADXSETCONTAINER=49988
Registered message WM_ADXGETAPPWINDOWPOS=49989
Registered message WM_ADXGETREGIONPARAM=49990
Registered message WM_ADXGETREGIONSIZE=49991
Registered message WM_ADXSETREGIONPARAM=49992
Registered message WM_ADXUPDATEFORMPARAM=49993
Registered message WM_ADXSETMAINPOS=49994
Registered message WM_ADXCLOSEAPPWINDOW=49995
Registered message WM_ADXSETLATESTPROC=49996
Registered message WM_ADXEXIST=49997
Registered message WM_ADXEXISTLAYOUT=49998
Registered message WM_ADXEXISTSERVICEFORM=49999
Registered message WM_ADXWMIGETCONTROL=50000
Registered message WM_ADXWMIPOSCHANGE=50001
Registered message WM_ADXWMISETPOS=50002
Registered message WM_ADXCOMMAND=50003
Registered message WM_ADXMANAGERCOMMAND=50004
Registered message WM_ADXMOUSELEAVE=50005
Registered message WM_MSO_BROADCASTCHANGE=49321
Registered message WM_ADXSETACTIVATE=50006
Registered message WM_ADXGETTYPESUBCLASS=50007
Registered message WM_ADXCLOSEBUTTONCLICK=50008
Registered message WM_ADXHIDEALLREGIONFORMS=50009
Registered message WM_ADXGETPICTURE=50010
Registered message WM_ADXSUPPORTMINIMIZE=50011
Registered message WM_ADXCONTAINERSHOWFLOATING=50012
Registered message WM_ADXCONTAINERHIDEFLOATING=50013
Registered message WM_ADXSHOWFLOATING=50014
Registered message WM_ADXHIDEFLOATING=50015
Registered message WM_ADXSETFLOATINGPOS=50016
Registered message WM_ADXGETDRAGLAYOUTPARAMS=50017
Registered message WM_ADXSETDRAGFORM=50018
Registered message WM_ADXSETDRAGITEMS=50019
Registered message WM_ADXGETFORMDEFAULTSIZE=50020
Registered message WM_ADXDRAGOVERMINIMIZED=50021
Registered message WM_ADXREDESIGNSUPPORT=50022
Registered message WM_ADXUPDATECLIPREGION=50023
Registered message WM_ADXCTP_VISIBLECHANGED=50024
Registered message WM_ADXMAYBEWORDVIEWWASCHANGED=50025
Registered message WM_ADXSTARTTRANSACTION=50026
Registered message WM_ADXENDTRANSACTION=50027
Registered message WM_ADXSWAPCONTROLLER=50028
Registered message WM_ADXCONTAINERREFRESH=50029
Registered message WM_ADXGETCAPTION=50030
Registered message WM_ADXHOSTVISIBLE=50031
Excel version: 15.0
Exceptions:
===========

ADXExcelTaskPanesManager.FinalizeClass: Exception from HRESULT: 0x800A03EC
Exception time: 11/13/2018 10:20:06 AM
at System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(Int32 dwCookie)
at AddinExpress.XL.ConnectionPointConnector.Disconnect()
at AddinExpress.XL.ConnectionPointConnector.Dispose()
at AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()

AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
Exception time: 11/13/2018 10:20:06 AM

AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
Error occured in ADXExcelTaskPanesManager.FinalizeClass . See 'Details' section to get more detailed information about the error.
Detailed technical information follows:
---
Date and Time: 11/13/2018 10:20:06 AM
Machine Name: C1LAB18352
IP Address: fe80::a461:fdf5:cf7c:7222%8
Current User: FCH\kdavis

Application Domain: C:\Program Files (x86)\Apparity Client\
Assembly Codebase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version: 4.0.0.0
Assembly Build Date: 8/13/2018 9:11:50 PM

Exception Source: mscorlib
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Exception from HRESULT: 0x800A03EC
Exception Target Site: Unadvise

---- Stack Trace ----
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(dwCookie As Int32)
AddinExpress.XL.2005.DLL: N 00000 (0x0) JIT
AddinExpress.XL.ConnectionPointConnector.Disconnect()
AddinExpress.XL.2005.DLL: N 0015 (0xF) IL
AddinExpress.XL.ConnectionPointConnector.Dispose()
AddinExpress.XL.2005.DLL: N 0001 (0x1) IL
AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()
AddinExpress.XL.2005.DLL: N 0164 (0xA4) IL




Log:
===========

11/13/2018 10:20:06 AM 1 -- |
11/13/2018 10:20:06 AM 1 -- | AddinExpress.XL.ADXExcelTaskPanesManager error: Exception from HRESULT: 0x800A03EC
11/13/2018 10:20:06 AM 1 -- | Exception time: 11/13/2018 10:20:06 AM
11/13/2018 10:20:06 AM 1 -- |
11/13/2018 10:20:06 AM 1 --ADXExceptionManager.DoError
11/13/2018 10:20:06 AM 1 --*!* ProcessError ADXExcelTaskPanesManager.FinalizeClass
11/13/2018 10:20:06 AM 1 -- |
11/13/2018 10:20:06 AM 1 -- | ADXExcelTaskPanesManager.FinalizeClass: Exception from HRESULT: 0x800A03EC
11/13/2018 10:20:06 AM 1 -- | Exception time: 11/13/2018 10:20:06 AM
11/13/2018 10:20:06 AM 1 -- |
11/13/2018 10:20:06 AM 1 ADXXXlExceptionManager.InternalProcessError
11/13/2018 10:20:06 AM 1 excelApplicationConnector.Dispose();
11/13/2018 10:20:06 AM 1 DoAddinBeginShutdown
11/13/2018 10:20:06 AM 1 SendMessageFindWindows
11/13/2018 10:20:01 AM 1 SendMessageFindWindows
11/13/2018 10:20:01 AM 1 SendMessageFindWindows
11/13/2018 10:19:55 AM 1 SendMessageFindWindows
11/13/2018 10:19:54 AM 1 SendMessageFindWindows
11/13/2018 10:19:46 AM 1 SendMessageFindWindows
11/13/2018 10:19:22 AM 1 SendMessageFindWindows
11/13/2018 10:16:20 AM 1 SendMessageFindWindows
11/13/2018 10:16:18 AM 1 SendMessageFindWindows
11/13/2018 10:16:17 AM 1 SendMessageFindWindows
11/13/2018 10:16:14 AM 1 SendMessageFindWindows
11/13/2018 10:16:03 AM 1 SendMessageFindWindows
11/13/2018 10:15:55 AM 1 SendMessageFindWindows
11/13/2018 10:15:38 AM 1 SendMessageFindWindows
11/13/2018 10:15:28 AM 1 SendMessageFindWindows
11/13/2018 10:15:21 AM 1 SendMessageFindWindows
11/13/2018 10:15:10 AM 1 SendMessageFindWindows
11/13/2018 10:15:06 AM 1 SendMessageFindWindows
11/13/2018 10:14:43 AM 1 SendMessageFindWindows
11/13/2018 10:14:38 AM 1 SendMessageFindWindows
11/13/2018 10:14:33 AM 1 SendMessageFindWindows
11/13/2018 10:14:12 AM 1 SendMessageFindWindows
11/13/2018 10:14:03 AM 1 SendMessageFindWindows
11/13/2018 10:14:01 AM 1 SendMessageFindWindows
11/13/2018 10:13:55 AM 1 SendMessageFindWindows
11/13/2018 10:13:50 AM 1 SendMessageFindWindows
11/13/2018 10:13:17 AM 1 SendMessageFindWindows
11/13/2018 10:13:14 AM 1 ExcelContextArgs
11/13/2018 10:13:14 AM 1 ExcelContextArgs
11/13/2018 10:13:08 AM 1 SendMessageFindWindows
11/13/2018 10:13:05 AM 1 SendMessageFindWindows
11/13/2018 10:12:03 AM 1 ExcelContextArgs
11/13/2018 10:12:02 AM 1 ExcelContextArgs
11/13/2018 10:11:59 AM 1 DoAddinStartupComplete
11/13/2018 10:11:58 AM 1 ExcelContextArgs
11/13/2018 10:11:58 AM 1 ExcelContextArgs
11/13/2018 10:11:58 AM 1 ExcelApplication
11/13/2018 10:11:57 AM 1 RegistrySettings.LoadSettings
11/13/2018 10:11:57 AM 1 ExcelApplication
11/13/2018 10:11:57 AM 1 ExcelApplication
11/13/2018 10:11:57 AM 1 ExcelApplication
11/13/2018 10:11:57 AM 1 SetExcelVersion
11/13/2018 10:11:57 AM 1 ExcelApplication
11/13/2018 10:11:57 AM 1 DoAddinInitialize
11/13/2018 10:11:55 AM 1 SetOwner
11/13/2018 10:11:55 AM 1 --ADXXOlExceptionManager
11/13/2018 10:11:55 AM 1 InitializeClass

Detailed technical information follows:
---
Date and Time: 11/13/2018 10:20:06 AM
Machine Name: C1LAB18352
IP Address: fe80::a461:fdf5:cf7c:7222%8
Current User: FCH\kdavis

Application Domain: C:\Program Files (x86)\Apparity Client\
Assembly Codebase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version: 4.0.0.0
Assembly Build Date: 8/13/2018 9:11:50 PM

Exception Source: mscorlib
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Exception from HRESULT: 0x800A03EC
Exception Target Site: Unadvise

---- Stack Trace ----
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(dwCookie As Int32)
AddinExpress.XL.2005.DLL: N 00000 (0x0) JIT
AddinExpress.XL.ConnectionPointConnector.Disconnect()
AddinExpress.XL.2005.DLL: N 0015 (0xF) IL
AddinExpress.XL.ConnectionPointConnector.Dispose()
AddinExpress.XL.2005.DLL: N 0001 (0x1) IL
AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()
AddinExpress.XL.2005.DLL: N 0164 (0xA4) IL
Posted 14 Nov, 2018 13:22:21 Top
Andrei Smolin


Add-in Express team


Posts: 15583
Joined: 2006-05-11
Hello Amit,

Please check if the issue exists with Add-in Express 8.9; see https://www.add-in-express.com/downloads/adxnet.php. Make sure that your add-in uses AddinExpress.XL.2005.dll installed on your machine: the information you provide shows your add-in has a reference that points to AddinExpress.XL.2005.dll version 8.2.4371, not 8.7.4430.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 15 Nov, 2018 06:35:13 Top
Amit B




Posts: 29
Joined: 2013-09-13
This issue is still coming after upgrading to newer adx.

My adx dll version is 9.1 and I'm using addinxpress 8.2.4371.


What are the next steps.
Posted 05 Dec, 2018 16:11:41 Top
Andrei Smolin


Add-in Express team


Posts: 15583
Joined: 2006-05-11
Hello Amit,

Please make sure that all Add-in Express assemblies in your project as well as adxloader.dll and adxregistrator.exe that your installer deploys are of the same version. Also, always provide a full log with the call stack: this helps immensely.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Dec, 2018 04:10:19 Top
Amit B




Posts: 29
Joined: 2013-09-13
pplication Domain: C:\Program Files (x86)\**** Client\
Assembly Codebase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Assembly Full Name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Assembly Version: 4.0.0.0
Assembly Build Date: 9/10/2018 8:24:36 PM

Exception Source: mscorlib
Exception Type: System.Runtime.InteropServices.COMException
Exception Message: Exception from HRESULT: 0x800A03EC
Exception Target Site: Unadvise

---- Stack Trace ----
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(dwCookie As Int32)
AddinExpress.XL.2005.DLL: N 00000 (0x0) JIT
AddinExpress.XL.ConnectionPointConnector.Disconnect()
AddinExpress.XL.2005.DLL: N 0015 (0xF) IL
AddinExpress.XL.ConnectionPointConnector.Dispose()
AddinExpress.XL.2005.DLL: N 0001 (0x1) IL
AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()
AddinExpress.XL.2005.DLL: N 0191 (0xBF) IL



*******************************************adxloader**************************************************

Add-in Express Loader Log File: 12/06/2018 16:19:25:680

Startup directory: C:\Program Files (x86)\****\
Loader version: 9.1.4620.0
Operating System: Microsoft Windows 10 Enterprise Edition (build 16299), 64-bit
Process Owner: User
Command Line: "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" /dde
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
16:19:25:696 1720 3180 Start.
16:19:25:696 1720 3180 Creating a new instance of the add-in loader.
16:19:25:696 1720 3180 Loading mscoree.dll
16:19:25:696 1720 3180 Success.
16:19:25:696 1720 3180 Loading the configuration from the system registry.
16:19:25:696 1720 3180 Getting the latest CLR version.
16:19:25:696 1720 3180 The latest CLR version is 'v4.0.30319'.
16:19:25:696 1720 3180 The configuration has been loaded successfully.
16:19:25:696 1720 3180 Runtime version: v4.0.30319.
16:19:25:696 1720 3180 Assembly name: ****, PublicKeyToken=36D6DE9C030E9182.
16:19:25:696 1720 3180 Class name: ****.AddinModule.
16:19:25:696 1720 3180 Registry key: CLSID\{F44EB779-26E0-4272-B0D3-001F6548BDB1}.
16:19:25:696 1720 3180 Attempting to create a new instance of the managed add-in class: CLR - v4.0.30319
16:19:25:696 1720 3180 Loading CLR: v4.0.30319.
16:19:25:696 1720 3180 Calling CLRCreateInstance method.
16:19:25:696 1720 3180 Success.
16:19:25:696 1720 3180 Calling GetRuntime method.
16:19:25:696 1720 3180 Success.
16:19:25:696 1720 3180 Checking if the hosting API of .NET Framework v4.0 beta is installed.
16:19:26:196 1720 3180 The hosting API is up to date.
16:19:26:196 1720 3180 Calling SetDefaultStartupFlags method.
16:19:26:196 1720 3180 Success.
16:19:26:196 1720 3180 Calling GetInterface method for the CorRuntimeHost interface.
16:19:26:196 1720 3180 Success.
16:19:26:196 1720 3180 Starting CLR...
16:19:26:196 1720 3180 Success.
16:19:26:196 1720 3180 Getting the CLR version.
16:19:26:196 1720 3180 The CLR v4.0.30319 has been initialized successfully.
16:19:26:196 1720 3180 Creating a new domain setup.
16:19:26:196 1720 3180 Success.
16:19:26:196 1720 3180 Getting the add-in directory.
16:19:26:196 1720 3180 Success. The directory is 'C:\Program Files (x86)\**** Client\'
16:19:26:196 1720 3180 The configuration file is 'C:\Program Files (x86)\**** Client\app.config'
16:19:26:196 1720 3180 The 'shadow copy' is enabled.
16:19:26:196 1720 3180 Creating a new application domain.
16:19:26:211 1720 3180 Success.
16:19:26:211 1720 3180 Creating an instance of the managed class. Assembly identity: '*****, PublicKeyToken=36D6DE9C030E9182'
16:19:27:758 1720 3180 Success.
16:19:27:758 1720 3180 Unwrapping the managed class.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Querying the add-in extensibility.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Querying the custom task panes.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Querying the ribbon extensibility.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Querying the form regions.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Querying the encryption provider.
16:19:28:118 1720 3180 The 'EncryptionProvider' interface is not supported.
16:19:28:118 1720 3180 Getting the dispid of the 'Dispose' method.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Getting the dispid of the 'InitializeLoaderService' method.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 Invoking the 'InitializeLoaderService' method.
16:19:28:118 1720 3180 Success.
16:19:28:118 1720 3180 The instance of the managed add-in class has been created successfully.
Posted 07 Dec, 2018 14:56:56 Top
Andrei Smolin


Add-in Express team


Posts: 15583
Joined: 2006-05-11
Hello Amit,

We assume that you have different versions on AddinExpress.MSO.2005 and AddinExpress.XL.2005 assemblies in your project.

If this isn't the case, please provide us with a project that reproduces the issue.

Did you ever switch your add-in from per user to permachine or back?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 11 Dec, 2018 03:36:21 Top
Amit B




Posts: 29
Joined: 2013-09-13
Hi,

We are using latest 9.2 build and confirmed that AddinExpress.MSO.2005 and AddinExpress.XL.2005 are latest.
We haven't switched addin from per user to permachine or back. It has been always permachine.

These are the steps -
1.Install addin
2. Open file f1.
3. Open file f2
4. Close f2
5. close f1 -> error

---- Stack Trace ----
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(dwCookie As Int32)
AddinExpress.XL.2005.DLL: N 00000 (0x0) JIT
AddinExpress.XL.ConnectionPointConnector.Disconnect()
AddinExpress.XL.2005.DLL: N 0015 (0xF) IL
AddinExpress.XL.ConnectionPointConnector.Dispose()
AddinExpress.XL.2005.DLL: N 0001 (0x1) IL
AddinExpress.XL.ADXExcelTaskPanesManager.FinalizeClass()
AddinExpress.XL.2005.DLL: N 0191 (0xBF) IL


Please note that we can also not reproduce the issue. It is coming on customer machine and all machine with excel 2013 has same type of error. We have also verified that there is no other addin in the environment.

What I am looking for is a solution for handling these type of error. It seems that issue comes after addin shutdown event and it is not captured in the OnError event.
Do you think that it is something related to task manager dispose? if yes, then can you handle this error internally?



We have also created a dummy project where issue is reproducible. It is per user.

Code below

public partial class AddinModule : AddinExpress.MSO.ADXAddinModule
{
private ADXExcelTaskPanesManager adxExcelTaskPanesManager;

private ADXRibbonTab adxRibbonTab;
private ADXRibbonGroup adxRibbonGroup;
private ADXRibbonButton adxRibbonButtonWizard;

public AddinModule()
{
Application.EnableVisualStyles();
InitializeComponent();
// Please add any initialization code to the AddinInitialize event handler
}

#region Component Designer generated code
/// <summary>
/// Required by designer support - do not modify
/// the following method
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.adxExcelTaskPanesManager = new AddinExpress.XL.ADXExcelTaskPanesManager(this.components);
this.adxRibbonTab = new AddinExpress.MSO.ADXRibbonTab(this.components);
this.adxRibbonGroup = new AddinExpress.MSO.ADXRibbonGroup(this.components);
this.adxRibbonButtonWizard = new AddinExpress.MSO.ADXRibbonButton(this.components);

this.adxExcelTaskPanesManager.SetOwner(this);

this.adxRibbonTab.Caption = "Dummy Apparity Addin";
this.adxRibbonTab.Controls.Add(this.adxRibbonGroup);
this.adxRibbonTab.Id = "adxRibbonTab_d04a692ac05e41548f01fa86370eddc3";
this.adxRibbonTab.Ribbons = AddinExpress.MSO.ADXRibbons.msrExcelWorkbook;

this.adxRibbonGroup.Caption = "Group";
this.adxRibbonGroup.Controls.Add(this.adxRibbonButtonWizard);
this.adxRibbonGroup.Id = "adxRibbonGroup_78cf11019af9445ba7003638ee395de9";
this.adxRibbonGroup.Ribbons = AddinExpress.MSO.ADXRibbons.msrExcelWorkbook;

this.adxRibbonButtonWizard.Caption = "Dummy Apparity Addin Button";
this.adxRibbonButtonWizard.Id = "adxRibbonButton_53d9a90c66114044906e27710173d05b";
this.adxRibbonButtonWizard.ImageTransparentColor = System.Drawing.Color.Transparent;
this.adxRibbonButtonWizard.Ribbons = AddinExpress.MSO.ADXRibbons.msrExcelWorkbook;
this.adxRibbonButtonWizard.Size = AddinExpress.MSO.ADXRibbonXControlSize.Large;

this.adxRibbonButtonWizard.OnClick += new AddinExpress.MSO.ADXRibbonOnAction_EventHandler(this.adxRibbonButtonWizard_OnClick);


//
// AddinModule
//
this.AddinName = "Dummy Apparity Addin Project";
this.HandleShortcuts = true;
this.SupportedApps = AddinExpress.MSO.ADXOfficeHostApp.ohaExcel;

this.AddTaskPane();

}

private void AddTaskPane()
{
var mytpitem = new ADXExcelTaskPanesCollectionItem(this.components)
{
AlwaysShowHeader = true,
CloseButton = false,
Position = ADXExcelTaskPanePosition.Right,
RegionBorder = ADXRegionBorderStyle.None,
RestoreFromMinimizedState = true,
TaskPaneClassName = "DummyApparityAddin.ADXExcelDummyTaskPane",
UseOfficeThemeForBackground = true,
DefaultRegionState = ADXRegionState.Normal
};

//add it to the collection
this.adxExcelTaskPanesManager.Items.Add(mytpitem);

ADXExcelTaskPane managedWorkbooktpinstance = mytpitem.CreateTaskPaneInstance();
managedWorkbooktpinstance.Show();
}

private void adxRibbonButtonWizard_OnClick(object sender, IRibbonControl control, bool pressed)
{
foreach (Excel.Workbook workbook in ExcelApp.Workbooks)
{
if(workbook.FullName == ExcelApp.ActiveWorkbook.FullName)
{
string workbookName = workbook.FullName;
workbook.Close(true, Type.Missing, Type.Missing);
Thread.Sleep(5000);

Excel.Workbooks books = ExcelApp.Workbooks;
books.Open(workbookName);
}

}
}
#endregion

#region Add-in Express automatic code

// Required by Add-in Express - do not modify
// the methods within this region

public override System.ComponentModel.IContainer GetContainer()
{
if (components == null)
components = new System.ComponentModel.Container();
return components;
}

[ComRegisterFunctionAttribute]
public static void AddinRegister(Type t)
{
AddinExpress.MSO.ADXAddinModule.ADXRegister(t);
}

[ComUnregisterFunctionAttribute]
public static void AddinUnregister(Type t)
{
AddinExpress.MSO.ADXAddinModule.ADXUnregister(t);
}

public override void UninstallControls()
{
base.UninstallControls();
}

#endregion

public static new AddinModule CurrentInstance
{
get
{
return AddinExpress.MSO.ADXAddinModule.CurrentInstance as AddinModule;
}
}

public Excel._Application ExcelApp
{
get
{
return (HostApplication as Excel._Application);
}
}
}




public class ADXExcelDummyTaskPane : ADXExcelTaskPane
{
}
Posted 04 Jan, 2019 14:00:19 Top
Amit B




Posts: 29
Joined: 2013-09-13
Any updates?
Posted 07 Jan, 2019 12:53:26 Top
Amit B




Posts: 29
Joined: 2013-09-13
any updates?
Posted 08 Jan, 2019 11:03:08 Top
Andrei Smolin


Add-in Express team


Posts: 15583
Joined: 2006-05-11
Hello Amit,

Sorry for the delay; we were on holidays and it appeared impossible to find a specialist who could respond.

In the AddTaskPane method which is called from the constructor of the add-in module, you perform these calls:

ADXExcelTaskPane managedWorkbooktpinstance = mytpitem.CreateTaskPaneInstance();
managedWorkbooktpinstance.Show(); 


Comment out these code lines. You shouldn't create task pane instances as they are created by the forms manager itself.

If you need to control the instances, you can use 1) the ADXOlFormsManager.ADXBeforeFormInstanceCreate and/or 2) ADXOlForm.ADXBeforeFormShow (in this event, you can prevent the form instance from showing by setting ADXOlForm.Visible=false).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 Jan, 2019 04:00:36 Top