microsoft.public.dotnet.general, microsoft.public.dotnet.languages.csharp,microsoft.public.developer

  • Thread starter Thread starter Anushya
  • Start date Start date
A

Anushya

Hi
How to get the handle of outlook in an addins for outlook..

I tried this and couldnot find the namespace of IOleWindow. Is it in
UnsafeMethods of System.windows.forms.

IntPtr GetWindowHandle(IOleWindow Item)
{
IntPtr hWnd;
IntPtr hResult;
hResult = Item.GetWindow(hWnd);
return hWnd;
}
GetWindowHandle(Connect.GlobalApplicationObject.ActiveExplorer());

How to proceed to get the outlook window handle??
Anushya
 
Anushya,

IOleWindow is not defined anywhere in the framework (at least where it
is publically available). If you want to use it, then you will have to
define it yourself. If you define it correctly, then your definition will
be accepted by the runtime when your method it called with a parameter of
that type.

Hope this helps.
 
Back
Top