Inspector Position from Mailitem ?

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

Inspector Position from Mailitem ?
Try to find on which Monitor Outlook is running 
Ingo Klein




Posts: 11
Joined: 2010-07-29
Hi all,
another Week another minor Problem ;)

I try to find out on which Monitor Outlook is running to Display a MsgDlg on this Monitor, while reacting on an Event from ADXOutlookAppEvent.

So far i tried to get the current Inspector,the ActiveWindow or the Explorer out of the mailitem,without any luck.
The Adx always crashed as soon as i try to get any Position from the Inspector/Explorer or ActiveWindow.

Anyone has an idea how to figure out the current Position to Display a MessageDialog via MsgDlgPos on the correct Monitor ?

Thanks in advance,
Ingo




procedure TAddInModule.adxOutlookAppEvents1ItemSend(ASender: TObject;
  const Item: IDispatch; var Cancel: WordBool);

begin;
    cancel := SendMailCheck(Item);
end;

//

function TAddInModule.SendMailCheck(Item: IDispatch): Boolean;
var
  mailitem: Outlookxp._MailItem;
  .
  .
  insp : outlookxp.Inspector;
begin

if (item.QueryInterface(IID__MailItem, mailitem) = S_OK) then
  insp := mailitem.GetInspector;
  showmessage(inttostr(insp.Left));
Posted 29 Oct, 2010 05:48:40 Top
Ingo Klein




Posts: 11
Joined: 2010-07-29
Solved it ;)

if someone is interested :


function TAddInModule.MailCheck(Item: IDispatch): Boolean; 
var 
insp: Inspector;
begin 
  insp := outlookapp.ActiveInspector;
  Showmessage(inttostr(insp.Left));
End
Posted 01 Nov, 2010 05:38:26 Top
Andrei Smolin


Add-in Express team


Posts: 18827
Joined: 2006-05-11
Hi Ingo,

It's just super! My congratulations and thanks!


Andrei Smolin
Add-in Express Team Leader
Posted 01 Nov, 2010 05:56:54 Top