When will OnStartupComplete be fired?

S

Stephen

I'm having a small problem writing a c# office addin for multiple office
applications (mainly Word and PowerPoint). In the Word addin the
OnStartupComplete method seems to only get called once, the first time word
is loaded. If I open more word documents the OnStartupComplete method does
not get called again. However, in PowerPoint, the OnStartupComplete method
gets called every time I open a PowerPoint document, even though I already
have PowerPoint open.

Is this a known issue/feature? Could someone explain when I should expect to
see this event fired?
 
T

Tom Winter

Stephen said:
I'm having a small problem writing a c# office addin for multiple office
applications (mainly Word and PowerPoint). In the Word addin the
OnStartupComplete method seems to only get called once, the first time word
is loaded. If I open more word documents the OnStartupComplete method does
not get called again. However, in PowerPoint, the OnStartupComplete method
gets called every time I open a PowerPoint document, even though I already
have PowerPoint open.

Is this a known issue/feature? Could someone explain when I should expect to
see this event fired?

That sounds odd to me, but I'm not surprised if its true. Each Office app
does stuff how it wants to. Word only fires OnStartupComplete once. I'm sure
of that. If you want to know everytime a new document is opened, you need to
catch some of the Application object's events (sorry don't know them off the
top of my head.) I imagine PowerPoint would have some events like this in
its Application object, so you might be able to use the same code logic for
both apps, and then don't really worry about the OnStartupComplete
differences.
 
N

nmulard

I don't know for powerpoint but Word trigger the OnStartupComplete event
each time the Addin is loaded. You can easily check this behavior by adding
the COM Addin command (found in the tools section of the available commands
when you right click a toolbar and personnalize) and then check/uncheck your
addin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top