By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,989 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,989 IT Pros & Developers. It's quick & easy.

Automation client for Office 97 and above

P: n/a
Hi all,

I want to create an Office automation client for Office 97 (and newer) which
should automate Access, Excel and Word.
On my developer computer I have Office XP installed. In KB244167 (INFO:
Writing Automation Clients for Multiple Office Versions) Microsoft tells to
use the type libraries of the oldest office version the client should run

So I copied the type library files from a Office 97 installed on another
computer to a local directory and added references to these files into my
VB.NET project.

Then I added the following lines to my Main procedure for testing:

Dim excelapp As New Excel.Application
Dim outlookapp As New Outlook.Application
Dim ppapp As New PowerPoint.Application
Dim wordapp As New Word.Application
Dim accessapp As New Access.Application

When I run the application in Debug mode, I get an exception on the last
line (Dim accessapp....):
Eine nicht behandelte Ausnahme des Typs
'System.Runtime.InteropServices.COMException' ist in OAtest1.exe
Zusätzliche Informationen: Das COM-Objekt mit der CLSID
{8CC49940-3146-11CF-97A1-00AA00424A9F} ist ungültig oder wurde nicht

Rough translation:
An unexpected execption of Type
'System.Runtime.InteropServices.COMException' occured in OAtest1.exe
Additional information: The COM object with CLSID
{8CC49940-3146-11CF-97A1-00AA00424A9F} is invalid or was not registered.

When I comment out the last line, application runs without problems.
What is wrong?

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.