Add-in doesn't load when Excel launched by double-clicking file

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

Add-in doesn't load when Excel launched by double-clicking file
 
Nicholas Hebb




Posts: 94
Joined: 2008-08-22
To expand just a little on the subject title, when Excel is opened from the Start menu or Quick Launch, the add-in loads normally. But, if the user double-clicks an Excel file, Excel opens but does not load the add-in. Is there a known reason for this?

Note: This isn't an Add-in Express question. I have heard of other cases of this for non-ADX add-ins, but I thought maybe the experts at ADX might be able to shed some light on this topic.
Posted 06 Jun, 2012 11:13:53 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Hi Nicholas,

Please find what Heinz-Josef told about this issue here:

http://www.add-in-express.com/forum/read.php?FID=5&TID=6718&MID=33878

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jun, 2012 11:23:57 Top
Nicholas Hebb




Posts: 94
Joined: 2008-08-22
Hi Andrei,

Thank you for the link. Currently I have the following code in the AddinInitialize event. Would you recommend moving this to the OnStartupComplete event then?


private System.Globalization.CultureInfo _oldCulture;

private void AddinModule_AddinInitialize(object sender, EventArgs e)
{
  try
  {
    System.Windows.Forms.Application.EnableVisualStyles();
    _oldCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(ExcelApp.LanguageSettings.get_LanguageID(Office.MsoAppLanguageID.msoLanguageIDUI));
  }
  catch { /* ... */ }
}
Posted 06 Jun, 2012 23:26:23 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Nicholas,

Hmm... Is it Excel 2010 installed on Windows 7 and the file is opened from the Windows Explorer with preview pane shown? Excel 2010 + COM add-in + Windows 7 preview pane = issue?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 07 Jun, 2012 04:24:55 Top
Nicholas Hebb




Posts: 94
Joined: 2008-08-22
I followed up with the customer with your question above. It doesn't seem to be the preview pane issue.

In regard to my earlier question ("Would you recommend moving this to the OnStartupComplete event then?"), do you think the code in the AddinModule_AddinInitialize event needs to be moved to the OnStarupComplete event?

I placed the culture localization code in AddinModule_AddinInitialize because I wanted it set before adxTPManager_ADXBeforeTaskPaneInstanceCreate was called. However, if it's safer to set the culture on every form load (or task pane load) instead of once at initialization then I will certainly go that route.
Posted 12 Jun, 2012 00:36:21 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Nicholas,

I cannot tell you whether this is safer or not: we didn't meet this issue. Abstractly, this should be a "bit" safer but the size of the "bit" is unknown to me.
Posted 12 Jun, 2012 07:13:37 Top
Nicholas Hebb




Posts: 94
Joined: 2008-08-22
OK, thanks Andrei.
Posted 12 Jun, 2012 08:08:11 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Nicholas,

May I ask you to send me a note in case you find anything about moving this code?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jun, 2012 08:13:55 Top
Nicholas Hebb




Posts: 94
Joined: 2008-08-22
Hi Andrei - If I get any customer feedback after my next update, I'll be sure to let you know whether that affected the double-click issue.
Posted 13 Jun, 2012 00:43:34 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Thank you in advance.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Jun, 2012 02:33:03 Top