Outlook 2003 behavior not exhibited with earlier versions

M

-mhd

I have discovered an anomaly in Outlook 2003 automation that never
happened with 2002 or 2000.

I have a VB6 application that uses com automation to search Outlook
contacts and that part still works as designed with 2003.

However a VB menu item to run and display Outlook Contacts using the
following syntax...

CreateObject("wscript.shell").Run "outlook.exe"

now comes with some odd behavior. When shelled, Outlook Contacts in
Address card format displays as normal. When Outlook is minimized or
if I click X then Outlook closes to the tray displaying an icon which
it never did before with 2000 or 2002.

However, if I double click the Outlook icon in the tray, it doesn't
maximize as expected, instead it pops a tray balloon alert stating
that Outlook is not responding and some irrelevant (in my case) stuff
about exchange.

Another strange thing is if I launch Outlook from the start menu and
send it to tray it will behave as normal if I maximize it by clicking
the tray icon. Even if my problematic icon is in the tray it will now
behave normally as long as Outlook was manually started. If I exit
Outlook I will still have the icon that my application shelled, and it
goes back to popping the balloon alert if I try to maximize it.

Also if I do *not* shell Outlook from my application but do manually
launch it from the Start menu it will minimize/maximize normally all
day long. However if now exit Outlook, the icon remains (as long as my
app is running)and refuses to maximize again.

I can always use <CreateObject("wscript.shell").Run "outlook.exe"> to
reopen Outlook when the icon is visible, but nothing happens but a
balloon alert when I click the icon itself.

Users fully expect that icon to be functional when it is displayed
which is causing a support headache.

Before with earlier versions a tray icon never appeared so it never
confused users.

Any ideas?

-mhd
 
K

Ken Slovak - [MVP - Outlook]

Try using standard syntax: Set objOL = CreateObject("Outlook.Application")
 
M

-mhd

Ken Slovak - said:
Try using standard syntax: Set objOL = CreateObject("Outlook.Application")

I do use that syntax for automation that the application does. What I
am referring to is actually launching the Outlook application itself
if the user want to shell to the Outlook interface. After that all my
problems with the Outlook icon as outlined below happen.

It doesn't matter how Outlook is actually launched anyway. The user
may launch it manually but if my comm automation program is running
that pesky Outlook icon remain when he exits Outlook but it is not
functional. Exiting my application then kills the icon.

-mhd
 
K

Ken Slovak - [MVP - Outlook]

The fact that the icon remains indicates that you are not releasing all your
Outlook objects. You have to do that.
 
M

-mhd

Ken Slovak - said:
The fact that the icon remains indicates that you are not releasing all your
Outlook objects. You have to do that.

This is a telephony application that does Outlook lookups and screen
pops. Are you saying that I should only create the Outlook object at
the actual moment of doing a lookup instead for the duration of the
program being loaded? Would there be a speed penalty if I constantly
have to create a new object?
-mhd
 
K

Ken Slovak - [MVP - Outlook]

COM takes a while to create an object. How and when you dispose of your
Outlook objects is up to you, but as long as they have life Outlook won't
close and that icon will be there.
 

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