C
cory.j.layman
I am attempting to run this code in Outlook and get a "Run-Time Error
'429': ActiveX component can't create object"
I am doing this with Outlook and Excel 2007. This is my first attempt
to automate one application from within another. What might cause the
CreateObject call to fail?
Sub OpenExcel()
Dim XL As Excel.Application
Dim SearchStr. FileName as String
'*** Omit Code to find search string in contents of an email
Set XL = CreateObject("Excel.Appliction") '*** This line causes
the 429 error
XL.Visible = True
XL.GetOpenFilename "C:\*" & SearchStr * "*.xls*"
FileName = XL.GetOpenFilename("f:\flexcel_EC_Master\*" & ECN *
"*.xls*")
XL.Workbooks.Open FileName
End Sub
'429': ActiveX component can't create object"
I am doing this with Outlook and Excel 2007. This is my first attempt
to automate one application from within another. What might cause the
CreateObject call to fail?
Sub OpenExcel()
Dim XL As Excel.Application
Dim SearchStr. FileName as String
'*** Omit Code to find search string in contents of an email
Set XL = CreateObject("Excel.Appliction") '*** This line causes
the 429 error
XL.Visible = True
XL.GetOpenFilename "C:\*" & SearchStr * "*.xls*"
FileName = XL.GetOpenFilename("f:\flexcel_EC_Master\*" & ECN *
"*.xls*")
XL.Workbooks.Open FileName
End Sub