Hi there,
I'm facing the same issue with a PowerPoint add-in.
This is what I have in constructor and Addin_OnStartupComplete event is firing twice when I open two pptx files IF the second file is opened by double clicking on it in Windows explorer (it doesn't happen if the second file is opened through File -> Open menu in PowerPoint):
I fixed this by implementing a condition to process the Addin_OnStartupComplete event only the first time. Not the best solution, but it's working.
Adrian
I'm facing the same issue with a PowerPoint add-in.
This is what I have in constructor and Addin_OnStartupComplete event is firing twice when I open two pptx files IF the second file is opened by double clicking on it in Windows explorer (it doesn't happen if the second file is opened through File -> Open menu in PowerPoint):
public Addin()
{
this.OnStartupComplete += new OnStartupCompleteEventHandler(Addin_OnStartupComplete);
this.OnDisconnection += new OnDisconnectionEventHandler(Addin_OnDisconnection);
}
Removing the event handlers for the events OnStartupComplete and OnDisconnection from the constructor didn't worked for me (as it did for Michael in Excel), in my case the Addin_OnStartupComplete event is not fired at all.I fixed this by implementing a condition to process the Addin_OnStartupComplete event only the first time. Not the best solution, but it's working.
Adrian