Excel AddIn Exception when Excel is opened out of PowerPoint

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

Excel AddIn Exception when Excel is opened out of PowerPoint
 
Daniel Wosch


Guest


Hello together,
I get the following exception when Excel is started out of PowerPoint.
For example, if you want to create / add a chart in PowerPoint Excel gets opened automatically and throws the following exception.


Detailed technical information follows: 
---
(Inner Exception)
Date and Time:         26.01.2016 07:20:58
Machine Name:          DEVMACHINE
IP Address:            fe80::8c1d:fe13:6291:887f%3
Current User:          Domainuser

Application Domain:     C:DevelopmentProductProduct.ExcelToolbarinDebug
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

Exception Source:      mscorlib
Exception Type:        System.ArgumentOutOfRangeException
Exception Message:     Der Index lag au?erhalb des Bereichs. Er muss nicht negativ und kleiner als die Auflistung sein.
Parametername: index
Exception Target Site: System.Collections.IList.get_Item

---- Stack Trace ----
   System.Collections.CollectionBase.System.Collections.IList.get_Item(index As Int32)
       mscorlib.dll: N 0033 (0x21) IL 
   AddinExpress.XL.ADXExcelTaskPaneInstancesCollection.get_Item(index As Int32)
       mscorlib.dll: N 0001 (0x1) IL 
   Alanda.ExcelToolbar.AlandaToolbar.adxExcelEventsSheetSelectionChange(sender As Object, sheet As Object, range As Object)
       AlandaToolbar.cs: line 0147, col 22, IL 0090 (0x5A)
   AddinExpress.MSO.ADXExcelAppEvents.DoSheetSelectionChange(sheet As Object, range As Object)
       mscorlib.dll: N 0017 (0x11) IL 



(Outer Exception)
Date and Time:         26.01.2016 07:20:58
Machine Name:          DEVMACHINE
IP Address:            fe80::8c1d:fe13:6291:887f%3
Current User:          Domainuser

Application Domain:    C:DevelopmentProductProduct.ExcelToolbarinDebug
Assembly Codebase:     file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.MSO.2005/7.6.4084.2005__4416dd98f0861965/AddinExpress.MSO.2005.dll
Assembly Full Name:    AddinExpress.MSO.2005, Version=7.6.4084.2005, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version:      7.6.4084.2005

Exception Source:      
Exception Type:        AddinExpress.MSO.ADXExternalException
Exception Message:     An error has occurred in the code of the add-in.
Exception Target Site: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.

---- Stack Trace ----


the Stack Trace is definitely empty
Posted 26 Jan, 2016 01:34:00 Top
Daniel Wosch


Guest


Update:

Looks like that the Problem ist that
this.alandaTaskPanesCollection.TaskPaneInstances
contains no instances when excel is started out of powerpoint.
Posted 26 Jan, 2016 01:57:26 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Daniel,

Then you can check if this.alandaTaskPanesCollection.TaskPaneInstances.Count is zero.

If however you expect a pane instance should exist by that moment, I suggest that you debug your code.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Jan, 2016 04:59:25 Top
Daniel Wosch


Guest


Hi,
sure the
this.alandaTaskPanesCollection.TaskPaneInstances.Count
is zero, thats why the error occures

Andrei Smolin writes:
If however you expect a pane instance should exist by that moment, I suggest that you debug your code.


Sure i expect a pane instance to exist.
But why it does not exist when i start it out of powerpoint?
Posted 27 Jan, 2016 03:10:31 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Daniel Wosch writes:
Sure i expect a pane instance to exist. But why it does not exist when i start it out of powerpoint?


A test add-in with no custom logic does show a pane when I start Excel by right-clicking a chart and choosing Edit Data | Edit Data in Excel on the context menu.


Andrei Smolin
Add-in Express Team Leader
Posted 27 Jan, 2016 03:59:06 Top
Daniel Wosch


Guest


So am i doing something wrong or missing something that
this.alandaTaskPanesCollection.TaskPaneInstances.Count 
is zero when excel gets started out of powerpoint?
Posted 27 Jan, 2016 04:21:21 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
I suppose, yes, you do something wrong. Anyway, checking this requires debugging.


Andrei Smolin
Add-in Express Team Leader
Posted 27 Jan, 2016 04:30:39 Top
Daniel Wosch


Guest


Okay, this problem seems only to occur in Office 2007.
As I have noticed the ADDXXLModule is not loaded or initialized when Excel is started out of PowerPoint, as the initialise dialogue is not shown which is shown always when Excel opens or opened out of PowerPoint 2010 / 2013

I suppose, yes, you do something wrong. Anyway, checking this requires debugging.


Sure I've debugged it and as I said the TaskPaneInstance is not initialized. When I'm correct the TaskPaneInstance will be initialized automatically as i can found no invoke to the constructor of the TaskPane
Posted 27 Jan, 2016 08:09:31 Top
Daniel Wosch


Guest


So not any updates / suggestions?
Posted 03 Feb, 2016 04:53:43 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Daniel,

Sorry for the delay; I guess I overlooked your post somehow. I could debug this for you if you provide a sample project and describe the exact scenario. You can find the support email address in {Add-in Express installation folder}\readme.txt. When sending your email, please make sure it contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 03 Feb, 2016 05:45:44 Top