Question

Can't instantiate Excel with CreateObject("Excel.Application"), Google CalendarSync can't talk to Outlook, and the volume is reset to zero every time I restart my machine

Asked by: doowell

I've been addressing several separate issues on my machine and I have a hunch that they are COM-related or perhaps due to a corrupted registry.  It is however beyond my present powers to figure out exactly what's going on.

These separate issues all point the same way

1. In VBA, if I try to instantiate Excel using OLE with CreateObject("Excel.Application") I get an error message:
Run-time error '462': The remote server machine does not exist or is unavailable.

Note: I am trying to instantiate Excel on my local machine.  Not a remote server.

2. In C#, I have code to instantiate Excel using the Primary Interop Assemblies:
    myExcel = new Microsoft.Office.Interop.Excel.Application();

and I get a more verbose error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 800706ba.

3. I found this possible fix: http://blog.crowe.co.nz/archive/2006/03/02/589.aspx  When trying to launch Component Services however, as soon as I click on the Computers node under Component Services, the window simply vanishes from screen with no on-screen error message, leaving this in the Application event log:

Application image dump failed.
Server Application ID: {01885945-612C-4A53-A479-E97507453926}
Server Application Instance ID:
{2AE03C7E-7656-42BD-846A-89DDD65E51F4}
Server Application Name: COM+ Explorer
Error Code = 0x80004005 : Unspecified error
COM+ Services Internals Information:
File: d:\qxp_slp\com\com1x\src\shared\util\svcerr.cpp, Line: 1259
Comsvcs.dll file version: ENU 2001.12.4414.308 shp


4. Google CalendarSync worked fine for weeks then all of a sudden stopped being able to talk to Outlook.  I found this fix http://groups.google.com/group/Google-Calendar-Help/web/google-calendar-sync---faq?version=34&pli=1 which worked for a day or two, and then the problem reappeared.

5. Whenever I restart my machine, the volume gets reset to zero.

6. The Windows Installer service is set to start automatically, but never starts up.  I have to start it manually, but even so after a while it switches off.  This causes Windows Automatic Updates to fail.

I've tried running various Registry cleaners (Registry Medic, Norton, ASO) and whilst they all find plenty of things that need sorting out, the above issues persist.

I've also been through this and all seems in order:
http://support.microsoft.com/kb/828550

Short of rebuilding my machine, which I really don't want to do, I'm at a loss.  I'm nervous that uninstalling Office and then reinstalling is addressing the wrong topic.

Note: I am trying to instantiate Excel from a Windows application I'm writing in C# in order to generate reports.  The application and Excel are both on the same machine.

Any advice would be warmly received.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. createobject excel.application multiple instance?
    Hi, I have an application using createobject("excel.application") .... i'm using excel for print something... all work fine but if the user open a file excel (anyone) and click on a cell, my app stop... but it do that only for sheet in the same "instance",...
  2. Error: Type 'Excel.Application' Is Not Defined
    Hi, I am new to .NET and I am doing exercises from tutorials. I am now trying to automate excel but I come up with the above error. This is my code:- --- Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet xlApp = CType(CreateObject(...
  3. CreateObject("Excel.Application") failed while checki…
    What prerequisites must I do before I can create an Excel.Application object in my ASP/VBScript code on my web server? I have Excel installed on the server, and I've tried various methods of granting permission to the anonymous IUSR account and Web sharing for the Excel appl...
  4. CreateObject("Excel.Application") does not work
    I tried running the below piece of code server side just to open excel . <% Dim objExcel Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True %> It does not throw any error,simply executes and shows up nothing.Am I missing somethin...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: nike_golfPosted on 2008-09-28 at 04:48:03ID: 22590582

What kind of machine and what version of Excel?

 

by: doowellPosted on 2008-09-28 at 04:50:36ID: 22590590

Hi nike gold - thanks for the super-speedy response.
Windows PC, Dell OptiPlex GX620, Windows XP, Excel 2007.
Sorry if I didn't make this super-clear.
Thanks.

 

by: doowellPosted on 2008-09-28 at 06:27:39ID: 22590860

This looks promising
http://simple-pc-help.com/support/runtime_0x80004005.html?t202id=1198&t202kw=0x80004005&gclid=CNCE7LPK_pUCFQHilAoduBkAEA

Unless this registry maintenance tool does something none of the others do, I can't see that it's going to help for sure, but even so seems the issue is indeed in the registry.

 

by: doowellPosted on 2008-09-28 at 10:14:46ID: 22591835

Making slow progress on this ... tried reinstalling Excel 2007 from the original Enterprise edition CD and it can't find various .cab files during the install.  Even if I respond to the prompt with the correct location, the installer says "Invalid Location".

I did some more searching and a bit of lateral thinking and figured maybe something basic with COM+ was wrong.  I found these:
http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1132174,00.html
http://www.tek-tips.com/viewthread.cfm?qid=758414&page=2
http://support.microsoft.com/default.aspx?scid=kb;en-us;315296

and in particular "I think fixed it. It's the GOD DAMN COM+ System Application service. It was turned off. Turn that back on and your comp will be okay." from the second of those three.

Lo and behold my COM+ System Application Service was switched off.  I've turned it back on but now the problem is that I can't reinstall Excel 2007.  I just selectively removed it from Office 2007 and left the rest in place.  But it now won't reinstalll with the aforementioned "Invalid Location" message, even when I hold its hand it point it at exactly the right folder.

Does this speak of a damaged COM+ Catalog (something about which I really know very little)?  I can't figure out for the life of me which the Office 2007 installer can't see what I point it at.

I found a few posts through Google under 'reinstall Office "Invalid Location" ' but nothing conclusive yet.

This is soooooooooooo frustrating but I'm sure eventually it will go away.

Meanwhile I've cleaned by registry with a few different tools and seemingly hundreds of incorrect COM and ActiveX registrations have been fixed.  It's just amazing how much mess there is under the bonnet of Windows.

 

by: zorvekPosted on 2008-09-28 at 11:51:12ID: 22592139

doowell,

I appreciate your desire to avoid rebuilding your box but one must always consider the time required to try and fix the problem(s) versus the time required to rebuild. Based on the above, your system has reached, in my opinion, a point where rebuilding is the only viable option. I have been trying to fix my XP Internet performance on one of my boxes for a week now and am just about ready to do a rebuild. Your situation is worse. Consider:

- While it only takes a few hours to rebuild a machine, the actual time spent is even less, especially if you have other things to do.

- Once multiple serious problems start happening like "volume gets reset to zero" or "Windows Installer service is set to start automatically, but never starts up" then you can be pretty sure there are other bad things going on you haven't even discovered.

- Assuming you can even find the root cause, how will you know other problems haven't been created by that issue that now have to be found and fixed?

- Windows is notorious for getting buggered after so many hours of usage. Once it starts to show signs of stress, it almost always keeps getting worse and is difficult to recover. I have a general rule that my systems won't last more than six months to a year and put each on a rebuild list about once a year or sooner if they start showing signs of problems.

- You probably don't even use a some number of applications and utilities you have installed and rebuilding your box will purge those installations. Even if you uninstalled each and every application and utility you no longer use, uninstallers sometimes can't completely undo everything the installer did.

---

Should you decide to rebuild, start by taking inventory of of the applications and utilities you use. Make note of any settings you have made. For each application and utility that has more than a few settings, locate where the settings are stored and make a copy. If the references are stored in the registry, all you need to do is, using RegEdit, find the node containing the settings and export it. The exported file can be double-clicked to re-install the settings.

One of the things I have done in the past is to make an image of the box once I reach a baseline point. This makes rebuilding a lot easier.

Kevin

 

by: doowellPosted on 2008-09-28 at 17:09:42ID: 22593112

Kevin,
Thanks for the response.  My machine is a development box so it has absolutely masses of stuff on it.  I did however come across a method of reinstalling Windows XP that would preserve all the existing accounts, settings and applications.  Seems it's little-know but has worked a treat.
Insert the WinXP CD, navigate to the i386 directory at the MS-DOS command prompt and then issue the command

    WINNT32 /unattend

This sets the Windows installer going in unattended mode, which reinstalls Windows "underneath" everything that's already there.  I have no idea how it works and it must have been one huge feat of engineering, but within two hours my machine is back to its old form and the volume and Installer service issues have disappeared.  I'm about to try to reinstall Excel and all signs are so far positive.

I can't award myself points for solving this, so if anyone else has any good ideas I'll gladly bestow the points.  Otherwise Kevin will get them by default!

Cheers

 

by: zorvekPosted on 2008-09-28 at 18:43:29ID: 22593368

Well, you, in essence, did reinstall Windows. Just not quite the way I recommended doing so. I'll have to try that one myself on my "slow" box :-)
Can't hurt.

Kevin

 

by: doowellPosted on 2008-09-29 at 02:46:43ID: 22594894

Can someone ajudicate and determine whether I should give Kevin the points anyway...?

 

by: doowellPosted on 2008-09-29 at 02:50:53ID: 22594913

By the way Kevin, the turnaround in my machine's performance is incredible.  Everything is fast and zippy and EVERY SINGLE ISSUE LISTED ABOVE (and some others) has disappeared.
Forget rebuilding your machine every 6-12 months.  The unattended reinstall is the way forward.  The only trick is that it took a while to persuade the installer to install the devices.  I ended up unplugging all my USB kit and hard-restarting the machine as the installer hung for a couple of hours on the devices section.  I was terrified that I would fry my machine, but it seems the gurus who wrote the installer have made it virtually nuclear bomb proof, and it just resumed as if nothing had happened when I switched it back on.
I have to say, Microsoft come in for a lot flak, a lot of it justifiable (e.g. the depth of the click paths to find essential settings in really obscure places, and the sprawling, messy feel of their software), but when it comes to networking and now this issue of reinstalling Windows, I am SERIOUSLY impressed.
Congrats and respect to whoever is behind it.

 

by: doowellPosted on 2008-10-06 at 03:42:14ID: 31500957

Am being generous, as I solved the issue myself, but in a way similar to what the respondent suggested.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...