Hmm, see if it's any better if you don't use an Inspector at all when you
create the mail item, something like this:
MailItem lobjNewMailitem =
(MailItem)Application.CreateItem(OlItemType.olMailItem);
lobjNewMailItem.Display(false);
If Outlook is actually displaying an error or warning message that could
also be the problem. In that case about all you can do is to make sure the
error doesn't occur with lots of checking to prevent the error in the first
place.
--
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
"Neetu" <(E-Mail Removed)> wrote in message
news:809CB4C9-4F49-4095-9C91-(E-Mail Removed)...
> Yes Ken. That Y before opening ne main item, i m explicity closing all
> possible forms. we have total 2 forms inside our project. still i m
> getting
> this error message.
> Is there any way to find any open modal form inside outlook?
>