General information
Category:
COM/DCOM and OLE Automation
If the createobject line errors out, a variation of Al's idea probable - multiple versions of Excel or remains thereof in registry.
The other gotcha for heavy COM objects is sometimes internal state of loading object, esp. true in IE/WebBrowser. This should only happen AFTER createobject(), if that is the case, throwing in Doevents or Wait Window Timeout xxx should help.
Band aid/ugly patch would be to persist last run of Excel and if needed run it via run/! before automating it. GetObject() to such an instance reads well in documentation, but has problems as well - createobject() most f the time better even if running instance is guaranteed.
HTH
thomas
>Office Excel.2007 won't automate unless it has run once.
>
>m.loExcel = CreateObject("Excel.Application")
>Error Ole error code 0x80080005: Server execution failed.
>With (m.loExcel)
> * do neat excel stuff here
>Endwith && excel
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only