View Single Post
  #5  
Old March 24th 10, 05:16 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007 Add-in strange load behavior

Well, my recommendation would be to use a shared addin rather than VSTO.
That way you can decide when to allow your addin to instantiate itself and
whether or not to handle Simple MAPI Inspectors and headless Outlook. I do
that myself to handle that sort of thing.

The timer thing works very well, Sue contacted me about that and I told her
how to do it. But you do need to handle cases where your timer fires before
NewInspector() so you don't handle the same Inspector more than once.

I think the delayed startup is a function of VSTO handling Extensibility
events internally and not passing them along as a Startup() event right
away. That's how it does things on startup. By removing that code between
you and OnConnection() you can handle things the way you want.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"SomewhereSomehow" wrote in
message ...
Hello, Ken!
Yes, I know about the problem of NewInspector event. About 4 years ago, I
developed add-in for Outlook 2003 (actually now I'm trying to create the
new
version of it, using VSTO 3.0 for Outlook 2007), and Sue Mosher from
outlookcode.com told me that there is such a problem, and adviced to check
inspector collection manually on timer. That worked out ok.
But that was developed without VSTO, just by implementing
IDTExtensibility2
interface in Connect class in VS 2003 shared addin project template.

Now the thing is that Add-in starts AFTER I close the window of New
Message.
So nor timer nor any user code could be used to customize message window,
it
just runs after i close the window...

And another problem - about message window that stays on the screen after
send or close, I don't understood your advce?
I've allready posted a message he

http://social.msdn.microsoft.com/For...8-5196939f786f

but unfortunately got no replies...


Ads