QI for IOleWindow fails in Outlook2003 office suite

N

Nitin Agrawal

Hi,
I want a handle of Outlook Compose Window.
For this I am listening to Item_Open event.
As the controls come in Item_Open event I displays the Item( Item.Display
method) and set its state to Maximize.
When I am calling QI on inspector object of this item it is failing in
Outlook 2003 office suite.
It is working fine with Outlook2000 ,any suggestion?
I tried the same thing in BeforeMaximize event of inspector also , but it
result the same.

Also when outlook compose is opened by autoamtion code(Not from Outlook
application) the compose window comes blinking in task bar.
Is there any way to bring it to front?

Thanks,
Nitin Agrawal.
 
D

Dmitry Streblechenko \(MVP\)

It works just fine in Outlook 2003 unless you are using the Word Editor,
which also does not work in the previous versions of Outlook.
You can try to wait for the Inspector.Activate event, then call
GetForegroundWindow Win API function.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
N

Nitin Agrawal

Hi Dmitry,

Thanks for providing valuable information.
I have one question , are there some other properties or intefaces that are
dependant on editor type.

Thanks,
--Nitin
 
D

Dmitry Streblechenko \(MVP\)

Yes, Inspector.HTMLEditor and Inspector.WordEditor will return a valid
object or NULL depending on the editor type.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top