Outlook 2010 hides on Send/Receive

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

Outlook 2010 hides on Send/Receive
 
Spiros Nikolopoulos




Posts: 42
Joined: 2012-01-05
Yes we do change the Application.Handle

first in :

procedure TAddInModule.adxCOMAddInModuleAddInInitialize(Sender: TObject);
var
   IWnd: IOleWindow;
   handle: HWND;
begin
  FastCommandBarSearch := True;
  Application.Handle := GetActiveWindow ();


  // Delphi application handle
  if (OutlookApp.ActiveExplorer <> nil) then begin
    OutlookApp.ActiveExplorer.QueryInterface(IOleWindow, IWnd);
    if Assigned(IWnd) then
      try
        IWnd.GetWindow (handle);
        Application.Handle := handle;
      finally
        IWnd := nil;
      end;
  end;

  // Extended MAPI
  MAPIInitialize(nil);
  MAPILogonEx(0, nil, nil, MAPI_EXTENDED or MAPI_ALLOW_OTHERS, FSession);
  FSession.OpenAddressBook(0, nil, AB_NO_DIALOG, FAddrBook);

  InitSettings(Sender);

end;



and then for when a new item is selected we


  IExplorer := self.ExplorerObj;

  if Assigned(IExplorer) then
  begin

    SavedHandle := Application.Handle;
    Application.Handle := GetForegroundWindow ();

    try
      Subject.Text := GetSubject(IExplorer, SaveAttachments, itm);

    finally
      Application.Handle := SavedHandle;
    end;

    IExplorer := nil;
  end;
Posted 16 Nov, 2012 04:52:28 Top
Dmitry Kostochko


Add-in Express team


Posts: 2740
Joined: 2004-04-05
Hi Spiros,

Thank you! Please try to temporary comment out Application.Handle := code lines in these code parts and test your project anew.
Posted 16 Nov, 2012 05:03:23 Top
Spiros Nikolopoulos




Posts: 42
Joined: 2012-01-05
Dmitry,

The system looks stable now !
I'll test it for a some days and I get back to you !

Thank you!
Posted 16 Nov, 2012 05:15:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2740
Joined: 2004-04-05
Hi Spiros,

Thank you for good news!
Please keep us informed about your test results.
Posted 16 Nov, 2012 05:53:35 Top