Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to tell if app is running (AXP)

    Is there a way to tell if an application is running, say Outlook, when you open a form?

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to tell if app is running (AXP)

    For applications such as Outlook, Word and Excel, you can use something like this:

    Dim appOL As Object
    On Error Resume Next
    Set appOL = GetObject(, "Outlook.Application")
    If appOL Is Nothing Then
    MsgBox "Outlook is not running"
    Else
    MsgBox "Outlook is running"
    End If

    GetObject returns an error is no object of the specified class is found, so you need to trap errors.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •