New Mail Item Inspector is doubled

Add-in Express™ Support Service
That's what is more important than anything else

New Mail Item Inspector is doubled
and remains open after sending? 
Ronald Bouras




Posts: 32
Joined: 2006-05-20
hi everybody,
i got the following code in my adxolform:

Outlook.MailItem mi = (Outlook.MailItem)((Outlook.Application)OutlookAppObj).CreateItem(Outlook.OlItemType.olMailItem);
mi.To = "donald@duck.com";
mi.Display(true);


what happens is that after pressing the "send and close" button in the window the message will be sent but the inspector stays open - i will have to close it manually once more.

any tips anybody???

thanx

ron
Posted 13 Jul, 2006 08:38:08 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Ron.

You should use the 'false' parameter in the 'Display' method.
Posted 13 Jul, 2006 09:31:57 Top
Ronald Bouras




Posts: 32
Joined: 2006-05-20
thanx sergey,

this indeed solves the problem but leads to another:
i wish the window to be modal because i do NOT want to allow the user to do other things in outlook until the current mail has been sent.

more ideas from your side?

regards

ron
Posted 13 Jul, 2006 09:45:00 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Ronald, I don't have another solution now. The fact is that Outlook works incorrectly if you open a new mail item in a modal inspector. I am afraid it can't be fixed. But I will send you a solution if I find it.
Posted 13 Jul, 2006 10:23:30 Top