I created a routine to send mail with Outlook that shows me a runtime error if Outlook is not installed on your computer.
How can I check if Outlook is installed on the PC to prevent the error of Run Time 429?
Thank's for the support
Giovanni Roi
How to test the presence of Outlook on the PC
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 21
- Joined: Fri Jul 03, 2009 4:36 pm
- Location: Milan,Italy
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
So why not check for that error?
On Error Resume Next
Set ol = CreateObject("bla")
If Error.Number = 429 Then
MsgBox "bla is not installed"
End if
On Error Goto 0
On Error Resume Next
Set ol = CreateObject("bla")
If Error.Number = 429 Then
MsgBox "bla is not installed"
End if
On Error Goto 0
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 21
- Joined: Fri Jul 03, 2009 4:36 pm
- Location: Milan,Italy
I Try to make this script but I have always an error message also if I have installed Outlook
===================
VBStart
Function TestOutlook()
On Error Resume Next
'Create OL App object
Set objOLApp = CreateObject("Outlook.Application")
If Error.Number = 429 Then
TestOutlook = "Outlook non presente"
Exit Function
End If
'Free up the space
Set objOLApp = Nothing
TestOutlook = "Success"
End Function
VBEnd
VBEval>TestOutlook(),Answer
MessageModal>Answer
==================
Is this script correct?
Thank's for the support
Giovanni Roi
===================
VBStart
Function TestOutlook()
On Error Resume Next
'Create OL App object
Set objOLApp = CreateObject("Outlook.Application")
If Error.Number = 429 Then
TestOutlook = "Outlook non presente"
Exit Function
End If
'Free up the space
Set objOLApp = Nothing
TestOutlook = "Success"
End Function
VBEnd
VBEval>TestOutlook(),Answer
MessageModal>Answer
==================
Is this script correct?
Thank's for the support
Giovanni Roi
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
My mistake, it should be:
If Err.Number = 429 Then
If Err.Number = 429 Then
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 21
- Joined: Fri Jul 03, 2009 4:36 pm
- Location: Milan,Italy