Word 2003 COM Addin OnConnect not Firing?

T

Terry Rossi

Hi I am trying to use the HOW-TO: Build an Office 2000 COM Add-In in
Visual Basic sample ( http://support.microsoft.com/?id=238228 ) with
VB 6 SP5 and Office 2003. I can build the sample (I tried with Word
and Excel) and the sample is listed in the add-in manager for the
application however the _OnConnect method never fires.

I took the same dll and stuck it on a Office 2000 system and it worked
correctly. I also checked the registry for the LoadBehavior and it is
correctly set to 3. No items are disabled in Words (Help -> About)

Is there a fundimental change in Word 2003 from Word 2000 regarding
COM Add-Ins? The sample code is very simple. Adds a command bar and
shows a message box for key press.


Any help is appreciated..


Newbie --
Terry Rossi
 
P

Peter Huang

Hi Terry,

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you build an Addin with VB6+SP5
according to the KB Article below.
HOW-TO: Build an Office 2000 COM Add-In in
Visual Basic sample ( http://support.microsoft.com/?id=238228 )
However the Addin will work only on Word 2000 but not Word 2003, you can
see the Addin in the COM-Addins ListBox, but the _OnConnect will not be
fired. And you have seen the LoadBehavior is 3 in the registry as below.

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\MyAddIn.Connect]
"FriendlyName"="My Add-In"
"Description"="Add-In Project Template"
"LoadBehavior"=dword:00000003
"CommandLineSafe"=dword:00000000

[NOTE]
Please make sure if you have seen the similar registry key on your machine.
Word 2000 or Word 2003 will check the registry key to load the Addins.

Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I can not reproduce the problem, I follow the KB article above, the addin
will work both on Word2000 and Word 2003.

I wants to confirm you with something.
1. Did the Word2000 and Word 2003 are on the same machine?
If no, Did you build the COM-Addin with VB6+SP5 on Word2000 machine or on
Word2003 machine?
2. Since you can the Addin in COM Addins manager, was the Addin checked?
You may try to check and uncheck the Addin to see if the _OnConnect event
will be fired. Or did you see any error message, if so please post here.

To isolate the problem, I think you may try to build the addin in another
machine with just Word 2003 installed(I mean you did not install two
versions of office) to see if the problem persist.

Based on my experience, there is no fundermental change in Word 2003 and
Word 2000 which may cause the problem.

Please Apply My Suggestion Above And Let Me Know If It Helps Resolve Your
Problem.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Chango V.

Check your macro security settings. They may be different. Word 2003 even
has a new level - "Very High".

//
 
T

Terry Rossi

Hi Peter,

You have the details correct with one clarification. The machine
which I built the Add-In only had Office 2003 installed. Today I
loaded the same project into VB and tested it and it worked correctly.
I had been working on other com add-in samples between my initial
post and now but had not touched this project since I posted the
problem. Suddenly it works! Perhaps something in the other projects
changed something that now allowed the button bar to appear and the
_Onconnect event to fire?

Regards,

Terry
 
P

Peter Huang

Hi Terry,

Thanks for your quickly reply!

I am glad that the problem has been resolved.
If you have any concern on this issue again, please post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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