View Single Post
  #6  
Old March 25th 10, 08:54 AM posted to microsoft.public.outlook.program_addins
SomewhereSomehow
external usenet poster
 
Posts: 7
Default Outlook 2007 Add-in strange load behavior

Thank for the explanation, Ken! I appreciate it much!
As for the first problem everything is clear now.

And can you say something about the second one?
If I open Outook, then Excel, and create new message from excel, the addin
starts ok, but if I then press send or cross to close the window. The window
stays on the screen in hung up like state. If i press close once again it is
closing with no errors.
That thing happens only if ribbon is added to project. If there is no
ribbon, just command bars - everything works fine...
I thought it may be my code mistake, but i crerated empty addin with ribbon
- the same behavior, then I took example from MS site.
http://www.microsoft.com/downloads/d...displaylang=en

In OutlookRibbonXCS_VSTO project replaced "Contact" item to "Mail" item (to
make ribbon load in mail message window) and got the same behavior and hung
up window...


"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...


.

Ads