S
Salad
I have the following sub
Sub test()
'it doesn't matter which of these I use.
Dim olApp As Object
'Dim olApp As Outlook.Application
'always a (8007007e) error with following line.
'Set olApp = CreateObject("Outlook.Application")
'never get an error as long as Outlook is open
Set olApp = GetObject(, "Outlook.Application")
Set olApp = Nothing
MsgBox "Done"
End Sub
I have a reference set to Microsoft Outlook Object Library.
I commented out the CreateObject() line because I get a runtime error
(8007007e) "Automation Error: The specified model could not be found."
It works with the GetObject() line...but only if Outlook is open. If
Outlook is closed, I get an runtime error 429 "ActiveX can't create
object. Is this normal?
Any idea of what is wrong?
Sub test()
'it doesn't matter which of these I use.
Dim olApp As Object
'Dim olApp As Outlook.Application
'always a (8007007e) error with following line.
'Set olApp = CreateObject("Outlook.Application")
'never get an error as long as Outlook is open
Set olApp = GetObject(, "Outlook.Application")
Set olApp = Nothing
MsgBox "Done"
End Sub
I have a reference set to Microsoft Outlook Object Library.
I commented out the CreateObject() line because I get a runtime error
(8007007e) "Automation Error: The specified model could not be found."
It works with the GetObject() line...but only if Outlook is open. If
Outlook is closed, I get an runtime error 429 "ActiveX can't create
object. Is this normal?
Any idea of what is wrong?