CreateObject Fails with Error 429

  • Thread starter Thread starter cory.j.layman
  • Start date Start date
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
 
Assuming that you do have Excel installed there, are you running any script
stoppers? They typically come with an A-V package such as Norton or McAfee,
although some software firewalls also have script stoppers. Those type of
things can prevent CreateObject from working.
 
I have many other VBA programs in Outlook and Excel that run just
fine. This is the first time I have tried to automate one program
from another. The IT group has the A-V program locked up so if that's
what is killing it, there is little I can do to work around it.
 
I am attempting to run this code in Outlook and get a "Run-Time Error
'429': ActiveX component can't create object"
Set XL = CreateObject("Excel.Appliction") '*** This line causes
the 429 error

Appliction? Application. But yu've probbly realised that by now.

Roger
 
Back
Top