Close New Mail Inspector

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

Close New Mail Inspector
How do I close the New Mail Inspector Window 
Julian Pointer


Guest


How do I close the New Mail Inspector Window, my code is below, I bring up a screen before the users get to the email window, if the click cancel then I dont want to show the new email screen. I tried to close the inspector but this didnt work.


procedure TAddInModule.DoNewInspector(ASender: TObject; const Inspector: _Inspector);
var
IMail : MailItem;
Insp : TInspector;
begin

//New Mail Item
IMail := nil;
if Assigned(Inspector) and Assigned(Inspector.CurrentItem) then
Inspector.CurrentItem.QueryInterface(IID__MailItem, IMail);

if Assigned(IMail) then
if FileEmail(IMail) then
showmessage('Create mail')
else
showmessage('Close mail');
Posted 09 May, 2005 00:10:19 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Julian,

Do you need to close the Inspector window for a new mail item only or for existing mail items as well?

Posted 09 May, 2005 06:51:57 Top
Julian Pointer


Guest


Only new Mail items.... I have a form that comes up before the mail item, if they choose cancel then the new mail form should not show.

Posted 09 May, 2005 16:16:28 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Julian,

I have created an example for you. See the link below:
http://www.add-in-express.com/projects/adx-ol-insp-close.zip

Posted 10 May, 2005 10:16:55 Top
Julian Pointer


Guest


I get two errors when I try to open this project. I have emailed these to support.
Posted 10 May, 2005 20:37:06 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Julian,

It seems you use old version of Add-in Express. Please download and install version 2.3 Public Preview.

http://www.add-in-express.com/downloads/
Posted 11 May, 2005 02:46:05 Top