No ActiveX-access to Word.CommandBars or Word.COMAddIns

H

Henk Wisselink

I am programming Word documents through ActiveX commands through a Visual
Basic.NET 2003 application. The following command is a typical example I use
to disable the File-menu:
oWord.CommandBars("Menu Bar").Controls(1).Enabled=False.
This statement has functioned correctly for years also at various customer
sites. I use the Office 9.0 Object Library as a reference so the application
can run under Office2000 and higher.

Last week I had some setup problems on my PC and at the same time the
application went wrong generating "DLL file not registered" error message
consistenly. I reinstalled Visual Studio.NET and Office2000 and Office 2003
and tried thousands of other things but the error is still there.

The same error also appears in a Visual Basic 6.0 application and in
VBA-macros in Excel all of them trying to access a Word document. Curiously
enough the command functions correctly in a VBA-marco within the Word
document it selves. So it looks like that it only fails when it tries to
access the commandbars from within another application.

I have double checked the .NET and Office installations and
DLL-registration. Everything there is also working correctly; it is only the
AcitveX access to the CommandBars.
Has anyone any idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top