Open MSWord errors
Posted on 2002-06-12
I have been using the following code to open msword.
'Try to get word object - ie. Word is open
Set MSWdApp = GetObject (, "Word.Application")
'Can't create ActiveX object - ie. Word NOT open
If Err.Number = 429 Then
'Create word object
Set MSWdApp = CreateObject("Word.Application")
However sometimes on a new machine or clean install the
CreateObject("Word.Application") will fail for a number of reasons.
Some machines will say error "7 out of memory" and others will say error "-2423... automation error".
On these machines where the CreateObject fails, GetObject(, "Word.Application") will work.
BTW. I must have the word object late bound.
Can anyone shed some light on why the
CreateObject("Word.Application") would fail?