Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Run-time error '-2147417846 (8001010a)': Automation error (error 440)

197 views
Skip to first unread message

Dragan Gligoric

unread,
Apr 9, 2002, 4:13:42 PM4/9/02
to
I need a help!
I want to open MSWord2000 from VB6.0 application by clicking on the Command
named "Izvestaj". VB6.0 application started to launch Word (hard disc is
running), but suddenly it stopped and message is:

Run-time error '-2147417846 (8001010a)':
Automation error (error 440)

If I choose Debug option, there is Code below with marked line (STOP HERE).
Note: I have chosen (checked) reference Microsoft Word 9.0 Object Library (I
have Word2000), and Microsoft Office 8.0 Object Library, from menu Project.
When I chose Object Browser from View menu, I can see that I have
accessibility to Word objects named: Word.Application and Word.Document. So,
where is mistake?
Now, when I delete word "New" from marked line and run application again
everything works just perfect! But, when I save changes and close
application and start up again there is same problem! Application don't want
to launch MSWord!!!!!!!!!!!!!
Is there problem with my Windows98? Can anybody help me?!


Private Sub CmdIzvestaj_Click()

Dim objWord As Word.Application
Set objWord = New Word.Application.............................STOPPED
HERE
objWord.Visible = True

Dim objDoc As Word.Document
Set objDoc = objWord.Documents.Add

objDoc.Activate

objDoc.ActiveWindow.Selection.InsertAfter "Something"
objDoc.ActiveWindow.Selection.InsertParagraphAfter
objDoc.ActiveWindow.Selection.InsertAfter "Something more."
objDoc.ActiveWindow.Selection.InsertParagraphAfter

objDoc.ActiveWindow.Selection.Font.Bold = True

objDoc.ActiveWindow.Selection.EndOf

End Sub


--
Dragan Gligoric ( URL: http://SOLAIR.Eunet.yu/~dgligori ),
E-mail: dragang...@bigfoot.com


--
Dragan Gligoric ( URL: http://SOLAIR.Eunet.yu/~dgligori ),
Alekse Santica 25/30,
21000 Novi Sad,
Yugoslavia,
E-mail: dragang...@bigfoot.com


Bruce Johnson

unread,
Apr 10, 2002, 12:40:32 AM4/10/02
to
I never liked using the generic CLSID for Word (Word.Application).
Usually, I use the version specific name (Word.Application.8). Also, I
use the CreateObject function instead of adding the reference to the
project. Why? Other than that was what the first examples that I saw
did, it allows me to use the GetObject function to see if a version of
Word is already running.

Bruce Johnson
TAG Consulting
http://www.tagconsulting.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages