You can use GetObject. See
http://discuss.joelonsoftware.com/default.asp?joel.3.53952.6>I am toying with the possibility of adding functionality to an application that I am working on which allows for some sort of interfacing with a 3rd party application. For example: (This is just an example)
>
> My application can interface with outlook (if present) and read some emails in the inbox.
>
>My question is as follows. If Outlook is already open, how do I gain a reference to the existing Outlook to then use as I need?
>
>
> Dim objOutlook as Outlook.Application
>
> If OutlookOpen Then
> objOutlook = <Current Outlook Instance>
> Else
> objOutlook = New Outlook.Application
> End If
>
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com