An Add-In for Word 2000 developed with Delphi 6 should integrate an ActiveX
Control into the toolbar of Word.
The ActiveX Control was generated with Delphi and registered in ordinary
fashion.
The control is displayed in the Toolbar but I can not use the functionality
of it. Unfortunately, I do not get back a reference when I query an
interface
from the _CommandBarActiveX object.
It works fine if I use a simple CommandBarButton instead of my ActiveX
Control. To me it seems, that the control is missing a crucial part, which I
do not know yet.
An excerpt is shown below.
I really would appreciate any hint in this matter.
Thanks in advance, Torsten
.....
....
MyCommandBarControl:= MyCommandBar.Controls.Add(
msoControlActiveX,EmptyParam,EmptyParam,EmptyParam,EmptyParam);
....
....
CmdBarActiveX:= MyCommandBarControl as _CommandBarActiveX;
CmdBarActiveX.Set_ControlCLSID('{9C8E604B-C96D-43F0-A5CB-86D019CB4946}');
....
....
CmdBarActiveX.QueryInterface(IID_ MyActiveX_Iface, MyActiveX_Iface);