View Single Post
  #5  
Old April 4th 08, 01:44 PM posted to microsoft.public.outlook.program_addins
Neetu
external usenet poster
 
Posts: 19
Default New Mail Item Event

Hi Ken,

I found some other alternative . directly sending mail .
lobjNewMailItem.send();

Ken, is there any way to find where outlook is in offline or online..
so that if I fire this statement i can give appropriate message and save the
message in his/her mail box.


"Ken Slovak - [MVP - Outlook]" wrote:

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.olMail Item);

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" wrote in message
...
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?



Ads