Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

run-time error -2147417848 (80010108)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jairoscz@gmail.com - 03 May 2006 15:04 GMT
I have a VBA script (macro) that opens all the documents in a
directory, one at a time, and whilst the document is open, it scans the
text in it and extracts text that has a border around it.  The script
also opens an excel workbook with a list of over 6000 strings and
stores all these in an array in VBA.  The script then closes the excel
workbook.  The strings extracted from the word document are then
compared against the list that was on the excel workbook (now in the
array).

Anyway, as the script is running sometimes sooner, sometimes later, I
get this "run-time error -2147417848 (80010108)" and I have noooooo
idea what is causing it! I find reference to this error in the
microsoft website but none that applies to my problem.  If ANYBODY has
any idea what is going could you please help!!!

Thank you!

-
Jairo
Cindy M  -WordMVP- - 04 May 2006 08:31 GMT
> Anyway, as the script is running sometimes sooner, sometimes later, I
> get this "run-time error -2147417848 (80010108)" and I have noooooo
> idea what is causing it! I find reference to this error in the
> microsoft website but none that applies to my problem.

A search of the MSDN site didn't turn anything up, for me. Do you have
a URL or more for the information you did find?

> I have a VBA script (macro)

In which application is this script running?

Please describe the actions of the code you're using. It would also
help to see the code, with the line marked that's causing the error.

Finally, which version of Office is involved?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
Mike Stephenson - 05 May 2006 04:18 GMT
According to the ErrorLookup utility from Visual Studio, this error is:
"The object invoked has disconnected from its clients. "

This is a COM/Automation error.  In general terms it means that the COM object
(server) you are trying to automate (probably Excel) has probably shut down.

When you say "close the workbook", do you mean that you are actually telling
Excel to quit?  I'm not sure if VBScript has a Set object = Nothing type of
statement like VB/VBA, but I believe that would also release the Excel object
and it would quit.

It sounds to me like something is trying to access Excel after you have "closed
the workbook".  Without seeing your script, it's hard to tell.

As a note, rather than automating Excel just to get a list of strings, you might
want to store them in a text file and use regular file access functions to read
the strings into an array (in VB/VBA, you could read the entire file into a
single String variable and then do a split on vbCRLF to create your array with
just a couple of lines of code), or you could use ADO to read the Excel
spreadsheet file as if it was a database (very easy to do, just get the
connection string correct, and then each worksheet in the workbook represents a
table in the virtual database, no Excel required).

>I have a VBA script (macro) that opens all the documents in a
>directory, one at a time, and whilst the document is open, it scans the
[quoted text clipped - 15 lines]
>-
>Jairo
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.