Well, the first thing you have to do is figure out why Outlook is being
terminated. I'd have no idea why that's happening.
There are a number of ways to find the Outlook version, most involve
registry scanning. HKCR\Outlook.Application\CurVer is one of them. The
default value will be something like "Outlook.Application.11" for Outlook
2003, "Outlook.Application.10" for Outlook 2002, etc.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Dikbill" wrote in message
. ..
Ken,
Thnx for your quick response!
My example wasn't right, it's very hot here at the moment,
about 34 degrees Celcius at the moment, so ....
I have only one line in the catch and that is:
Dim olApplication as object = Nothing
Try
olApplication = GetObject(, "Outlook.Application")
Catch
olApplication = CreateObject("Outlook.Application")
End Try
I use the try catch, or I could use on error resume next,
code because if no Outlook.exe is running, I get the
error:
"Cannot create ActiveX component."
But I think the problem is that a new Outlook.exe is started
for a short moment and then is killed again by something,
not by me, and that the olApplication which is returned from
the GetObject call tries to connect with an Outlook.exe
instance which isn't there anymore.
Any suggestions, otherwise I hav e to trie something else, I
don't know what yet. It would be nice to know how to get
the current Oultook version before Outlook is started.
Do you have a solution for that?
Tnx again,
Dikbill, The Netherlands