|
-
Jul 5th, 2006, 04:00 AM
#1
Thread Starter
Member
[RESOLVED] how to know if outlook is running or not?
Haloo
I m new here, and I want to make a program that only run if outlook2002 is not open. so if outlook is open it will abort.
how to check if the outlook office is open or not
can somebody tell me the syntax how to recognize wether outlook is running or not.
thanks a lot
-
Jul 5th, 2006, 08:16 AM
#2
Re: how to know if outlook is running or not?
Use this function to check
VB Code:
Private Function OutlookRunning() As Boolean
On Error GoTo NotRunning
Dim OTL As Object
Set OTL = GetObject(, "Outlook.Application")
Set OTL = Nothing
OutlookRunning = True
Exit Function
NotRunning:
Set OTL = Nothing
OutlookRunning = False
End Function
Private Sub Form_Load()
If Not OutlookRunning Then
MsgBox "Its Not Running"
Else
MsgBox "Its Running"
End If
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 5th, 2006, 08:27 AM
#3
Thread Starter
Member
Re: how to know if outlook is running or not?
ok i will try that.. thanks..
i can not make it at the moment because i dont have vb compiler
-
Jul 5th, 2006, 08:29 AM
#4
Re: how to know if outlook is running or not?
you should be able to run that in an office app.. (like excel)
Just change the form_open to something else.... for testing
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 5th, 2006, 08:49 AM
#5
Thread Starter
Member
Re: how to know if outlook is running or not?
ok thank a lot its help me a lot.. can u also tell me the syntax wether the internet connection is available or not..
thanks for the help
btw if i compile and run it from excel.. if its possible to make it run at start up so the program will listen to internet availability until it run other task..
thanks
-
Jul 5th, 2006, 09:08 AM
#6
Re: how to know if outlook is running or not?
you can really "compile" and run from excel..
I just told u that so u can test it...
u will need VB to compile it to an exe...
as far as the internet.. you'll have to ping a server or something to test for the connection..
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 5th, 2006, 09:10 AM
#7
Thread Starter
Member
Re: how to know if outlook is running or not?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|