error 429


K

Kilo Bravo

I am trying to open a word document from an excel VBA module.

Sub openWord()

Dim myfile As String

myfile = "C:\MyWord.doc"

Word.Documents.Open filename:=myfile

End Sub

Everything was working fine and then it stopped. Now I get "Error 429 - ActiveX component cannot create object"

The strange part is it was working fine. I must have deleted something accidently. I added the right word version object library in the references.

What else could be missing?


--
Kilo Bravo

/*****************************************************************************
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
******************************************************************************/
 
Ad

Advertisements

T

Tom Ogilvy

Word would be a reference to an instance of word. You don't show anywhere
in your code where you create that reference and that would be consistent
with the error you are getting.

--
Regards,
Tom Ogilvy

I am trying to open a word document from an excel VBA module.

Sub openWord()

Dim myfile As String

myfile = "C:\MyWord.doc"

Word.Documents.Open filename:=myfile

End Sub

Everything was working fine and then it stopped. Now I get "Error 429 -
ActiveX component cannot create object"

The strange part is it was working fine. I must have deleted something
accidently. I added the right word version object library in the references.

What else could be missing?


--
Kilo Bravo

/***************************************************************************
**
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
****************************************************************************
**/
 
Ad

Advertisements

K

Kilo Bravo

The problem turned out to be word was not running. In order to open the word
document from an excel module with this code word has to be running first.


application.quit

closes an application what starts it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top