![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am creating a outlook add-in .on clicking on any custom folder created by
our add-in, we are opening windows forms. according to requirement , if some exception occours, we are providing a link button on errror form ( a window form with link button). on clicking on link we have to send mail from outlook. I am opening a mail item inside outlook programmatically. I m doing this like. MailItem lobjNewMailitem = (MailItem)Application.CreateItem(OlItemType.olMail Item); Microsoft.Office.Interop.Outlook.Application lobjApplication = this.Application; Microsoft.Office.Interop.Outlook.Inspector lobjInspector; lobjInspector = lobjApplication.Inspectors.Add(lobjNewMailitem); lobjNewMailitem = (MailItem)lobjInspector.CurrentItem; lobjInspector.Activate(); lobjInspector.Display(lobjNewMailitem); above code work fine if in case no other custom folder is opened inside outlook. eg - when user first time open outlook and if exception occurs. however soppose , if already other custom winform is opened like "Filter form" ( one of the windows form ) this code doesn't work.. it says "A dialog Box is open. close it and try again" Inside code before displaying new mail item , i m explicitly closing all possible forms like in our case we have 2 forms. so i m checking for them and closing all. still I m getting this exception. I am using c#, and VSTO for outlook 2007 any suggesstion would be g8 help.!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Before delete mail item Event Handler | RAMS | Outlook - Using Forms | 3 | March 3rd 08 01:38 PM |
NULL event item ? | Mark Beiley | Add-ins for Outlook | 0 | September 18th 07 11:46 PM |
Item Unload Event Doesn't Fire | Tim Pulley | Add-ins for Outlook | 3 | May 16th 07 04:42 PM |
catch the mail item on_focus event | john | Outlook and VBA | 1 | September 28th 06 12:33 PM |
Item Move event | AtulSureka | Outlook and VBA | 1 | February 24th 06 01:33 PM |