Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BIG problem!! Active X Component can't create object

Status
Not open for further replies.

cin2002

Programmer
Mar 19, 2002
29
US
Hi All,

I have a really big problem. I tried to have a spell check on my program. The code as following. It works fine on window 98 and 2000, but when I run it on window 95, It pops up "Run-time error '429': Active component can't create object" error message and close out everything. Can't everyone tell me how to fix?


Dim oWord As Word.Application
Dim oTmpDoc As Word.Document
Dim lOrigTop As Long

' Create a Word document object...
Set oWord = New Word.Application
Set oTmpDoc = oWord.Documents.Add

' Position Word off screen to avoid having document visible...
lOrigTop = oWord.Top
oWord.WindowState = 0
oWord.Top = -3000

Dim Index As Integer
Index = 1

' Assign the text to the document and check spelling...

For Index = 1 To 5
With oTmpDoc
.Content.Text = txtEEComment(Index)
.Activate
.CheckSpelling
End With
txtEEComment(Index).Text = Left(oTmpDoc.Content.Text, Len(oTmpDoc.Content.Text) - 1)
Next Index

' Close the document and exit Word...
oTmpDoc.Saved = True
oTmpDoc.Close

Set oTmpDoc = Nothing

oWord.Top = lOrigTop
oWord.WindowState = 2
oWord.Quit

Set oWord = Nothing
Set oTmpDoc = Nothing

MsgBox "Spell Check is complete", vbInformation + vbOKOnly
 
Which object is it complaining about not being able to create? Did you make sure that DCOM95 is installed on that PC?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top