WDB
asked on
VB5 CreateObject("Word.Basic") Doesn't Work for me
I'm creating an OLE interface with Word97 and I when I set an Object = CreateObject("Word.Basic") I get a compiler error
"Run time Error 429 "
"Active X component can't create object"
I've referenced the Microsoft Office Library. What am I doing wrong?
Thanks in advance for your help.
"Run time Error 429 "
"Active X component can't create object"
I've referenced the Microsoft Office Library. What am I doing wrong?
Thanks in advance for your help.
ASKER
Thanks for your response chualk's.
That's how I had it before and I still get the error. I'm referencing the Word 8.0 Object library as well as the VB Visual Basic for Applications extensibility.
That's how I had it before and I still get the error. I'm referencing the Word 8.0 Object library as well as the VB Visual Basic for Applications extensibility.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's strange that chualk's code didn't work for you, it worked on my machine.
Perhaps you have a bod install of Word (or VB?).
Perhaps you have a bod install of Word (or VB?).
Instead of "Word.Basic" ,You just try "Word.Application" &
give a reference to Word 8.0 Object library in reference dialog box.
give a reference to Word 8.0 Object library in reference dialog box.
Sub command1_click()
Dim xlApp As Object
Set xlApp = CreateObject("word.basic")
xlApp.AppShow
Remember to set xlapp = nothing after you do not need the object.
Regards,
Chualk