MOD2000: COM Add-ins Containing ActiveX Controls Cause Errors When Used in Office 2000 Application

ID: q237359


The information in this article applies to:

Moderate: Requires basic macro, coding, and interoperability skills.


SYMPTOMS

When you run a COM add-in from a Microsoft Office 2000 application, you may receive the following error messages

Run-time error '429':

Could not find the specified object.
-or-
Could not load an object, it is not available on this machine.
followed by:
Run-time error '-2147352573 (80020003)':

Could not find the specified object.


CAUSE

You are using a COM add-in that contains an ActiveX control on one of its user forms. ActiveX controls are not accessible from user forms in COM add-ins.


RESOLUTION

There are two possible workarounds for this behavior. Which workaround you should use depends upon how you want to implement your solution.

Using a COM Add-in

COM add-ins are useful because you can write a single add-in that can be used by many different Office applications. If you want to maintain this cross-application use, you can use API calls to access the functionality provided by the ActiveX control.

For example, you could replace the use of the Common Dialog ActiveX control with calls to Comdlg32.dll as described in the following Microsoft Knowledge Base article:
Q161286 HOWTO: Use a Common Dialog File Open Dialog with Win32 API

Using an Application Template

If you do not need the cross-application functionality provided by a COM add-in, you can develop your solution outside of a COM add-in. ActiveX controls on user forms work properly in an Office application template or a Visual Basic for Applications project.


REFERENCES

For more information about developing COM add-ins, see the Microsoft Office Developer Web site at:

http://msdn.microsoft.com/officedev/default.asp

Additional query words: pra prb


Keywords          : kbdta 
Version           : :
Platform          : 
Issue type        : kbprb 

Last Reviewed: July 26, 1999