One more thing just discovered, the same behavior in the sample code you
provided on your site
http://www.slovaktech.com.
I downloaded VSTO_CSOutlookProject, ran it, then ran excel, then created new
message from excel.
Then if you try to close the window everything will be ok, but if you first
select your tab VSTO_CS Addin, and then close the window - it will stay on
the screen
(As I understand as soon as customized ribbon is loaded/rendered the window
could'n close properly, my ribbon is added to the TabMailMessage so it
loads/renders as soon as window is shown, in your sample as soon as i select
VSTO_CS Addin tab - then in both cases the window stays on the screen...
"Ken Slovak - [MVP - Outlook]" wrote:
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...
.