OnConnect event not firing

K

Kevin B

I am completly stumped here. I have developed (& supported) a couple of inhouse Outllook COM Addins in VB6 and am doing the latest project (a pair of Word & Outlook addins) in VB.Net. Up until this morning everything was working fine, I could run the addin in debug, which ran the appropriate application, and could put stop points in the code.

Suddenly today, the Word addin doesn't appear to be working. I've even gone as far as creating a new Word addin (with only the basic bare code) and the OnConnect code isn't even firing. The entry is in the registry and if I set the same test addin for Outlook (i.e. add the needed registry entries) it works fine. It's as if Word has stopped accepting addins

When I try adding the addin manually, Word says that the dll is not a valid addin (but it also says that in Outlook, and it works fine there so I suspect it's related to it being a .Net dll)

I'm using XP Proffesional, Office XP & VS 2003. I've even tried rebootting in case it was just Windows being odd. Anyone have any advice

Thanks
Kevin
 
S

Siew Moi Khor [MS]

Hi Kevin,
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? Or has it
been reset to 2 in the registry? I'm going to copy and pase now from my
other post here today regarding this issue: If it has been reset to 2, it
means something went wrong OnConnection. When that happens, Office will
automatically reset the LoadBehavior. Try adding a try...catch block in the
OnConnection method to trap the exception.

2. If it isn't #1, could you try deleting the old registry entry and
install your addin via the setup package? Before you do that, set the
Register property for the setup project to vsdraCOM, recompile the setup
project, right click on the setup project, and click install.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
I am completly stumped here. I have developed (& supported) a couple of
inhouse Outllook COM Addins in VB6 and am doing the latest project (a pair
of Word & Outlook addins) in VB.Net. Up until this morning everything was
working fine, I could run the addin in debug, which ran the appropriate
application, and could put stop points in the code.
Suddenly today, the Word addin doesn't appear to be working. I've even
gone as far as creating a new Word addin (with only the basic bare code) and
the OnConnect code isn't even firing. The entry is in the registry and if I
set the same test addin for Outlook (i.e. add the needed registry entries)
it works fine. It's as if Word has stopped accepting addins.
When I try adding the addin manually, Word says that the dll is not a
valid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll).
I'm using XP Proffesional, Office XP & VS 2003. I've even tried
rebootting in case it was just Windows being odd. Anyone have any advice?
 
K

Kevin B

Hi Siew Moi,

I've investigated your two suggestions.
1. The LoadBehavior doesn't appear to be changing from 3. Adding a Try/Catch had no effect, but I have a stop point at the OnConnect declaration so I was pretty certian that the event wasn't just raising an error.

2. Removing the registry key for the addin (within the Addins key) and re-installing it didn't correct the behavior either. The Register property for the setup project was already vsdraCOM, so nothing was actually changed.

I did run the System Information utility (in the Accessories/System Tools Start folder) and it shows the addin as installed & loaded. I have tried both running within the Visual Studio with breakpoints & installing a very basic addin that only displays messageboxes in the OnConnect and OnStartupComplete events. The code just doesn't appear to be running.

As I said originally, an Outlook addin I'm developing works fine & this Word addin was working earlier this week. Is there a security setting in Word that could be keeping it from interacting with the addin?

Please feel free to email me directly. I need to resolve this as quickly as possible.

Thanks,
Kevin

----- Siew Moi Khor [MS] wrote: -----

Hi Kevin,
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? Or has it
been reset to 2 in the registry? I'm going to copy and pase now from my
other post here today regarding this issue: If it has been reset to 2, it
means something went wrong OnConnection. When that happens, Office will
automatically reset the LoadBehavior. Try adding a try...catch block in the
OnConnection method to trap the exception.

2. If it isn't #1, could you try deleting the old registry entry and
install your addin via the setup package? Before you do that, set the
Register property for the setup project to vsdraCOM, recompile the setup
project, right click on the setup project, and click install.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
I am completly stumped here. I have developed (& supported) a couple of
inhouse Outllook COM Addins in VB6 and am doing the latest project (a pair
of Word & Outlook addins) in VB.Net. Up until this morning everything was
working fine, I could run the addin in debug, which ran the appropriate
application, and could put stop points in the code.gone as far as creating a new Word addin (with only the basic bare code) and
the OnConnect code isn't even firing. The entry is in the registry and if I
set the same test addin for Outlook (i.e. add the needed registry entries)
it works fine. It's as if Word has stopped accepting addins.valid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll).
 
K

Kevin B

Hi again

The plot thickens. I created a new addin and added only the messageboxes to confirm what events were firing
1. Runs fine when installed. The events fire fine
2. Will not run from Visual Studio in debug. I set the debugging 'Start external program' property to ru
C:\Program Files\Microsoft Office\Office10\WINWORD.EX
Word is launching, but the addin is no longer running (neither with or without the stop points)
3. After attempting to run in debug mode the addin doesn't load untill it is re-installed. There appears to have been no changes in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\MyAddin.Connect key

Does this behavior shed any light on what's happening

Thanks again
Kevi

----- Kevin B wrote: ----

Hi Siew Moi

I've investigated your two suggestions
1. The LoadBehavior doesn't appear to be changing from 3. Adding a Try/Catch had no effect, but I have a stop point at the OnConnect declaration so I was pretty certian that the event wasn't just raising an error

2. Removing the registry key for the addin (within the Addins key) and re-installing it didn't correct the behavior either. The Register property for the setup project was already vsdraCOM, so nothing was actually changed

I did run the System Information utility (in the Accessories/System Tools Start folder) and it shows the addin as installed & loaded. I have tried both running within the Visual Studio with breakpoints & installing a very basic addin that only displays messageboxes in the OnConnect and OnStartupComplete events. The code just doesn't appear to be running

As I said originally, an Outlook addin I'm developing works fine & this Word addin was working earlier this week. Is there a security setting in Word that could be keeping it from interacting with the addin

Please feel free to email me directly. I need to resolve this as quickly as possible

Thanks
Kevi

----- Siew Moi Khor [MS] wrote: ----

Hi Kevin
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? Or has i
been reset to 2 in the registry? I'm going to copy and pase now from m
other post here today regarding this issue: If it has been reset to 2, i
means something went wrong OnConnection. When that happens, Office wil
automatically reset the LoadBehavior. Try adding a try...catch block in th
OnConnection method to trap the exception

2. If it isn't #1, could you try deleting the old registry entry an
install your addin via the setup package? Before you do that, set th
Register property for the setup project to vsdraCOM, recompile the setu
project, right click on the setup project, and click install

Siew Mo
--
This posting is provided 'AS IS' with no warranties, and confers no rights
Sample code subject to http://www.microsoft.com/info/cpyright.ht


Kevin B said:
I am completly stumped here. I have developed (& supported) a couple o
inhouse Outllook COM Addins in VB6 and am doing the latest project (a pai
of Word & Outlook addins) in VB.Net. Up until this morning everything wa
working fine, I could run the addin in debug, which ran the appropriat
application, and could put stop points in the codegone as far as creating a new Word addin (with only the basic bare code) an
the OnConnect code isn't even firing. The entry is in the registry and if
set the same test addin for Outlook (i.e. add the needed registry entries
it works fine. It's as if Word has stopped accepting addinsvalid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll).
 
S

Siew Moi Khor [MS]

Hi Kevin,interacting with the addin?
What is your security setting in Word? (Tools --> Macro --> Security). Try
putting it at Medium + uncheck "Trust all installed add-ins and template".
You should be prompted whether you want to enable "mscoree.dll"

Also could you check prior to that in Word, Help |---> About MS Word -->
click Disable Items to see if your add-ins is listed there.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
Hi Siew Moi,

I've investigated your two suggestions.
1. The LoadBehavior doesn't appear to be changing from 3. Adding a
Try/Catch had no effect, but I have a stop point at the OnConnect
declaration so I was pretty certian that the event wasn't just raising an
error.
2. Removing the registry key for the addin (within the Addins key) and
re-installing it didn't correct the behavior either. The Register property
for the setup project was already vsdraCOM, so nothing was actually changed.
I did run the System Information utility (in the Accessories/System Tools
Start folder) and it shows the addin as installed & loaded. I have tried
both running within the Visual Studio with breakpoints & installing a very
basic addin that only displays messageboxes in the OnConnect and
OnStartupComplete events. The code just doesn't appear to be running.
As I said originally, an Outlook addin I'm developing works fine & this
Word addin was working earlier this week. Is there a security setting in
Word that could be keeping it from interacting with the addin?
Please feel free to email me directly. I need to resolve this as quickly as possible.

Thanks,
Kevin

----- Siew Moi Khor [MS] wrote: -----

Hi Kevin,
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? Or has it
been reset to 2 in the registry? I'm going to copy and pase now from my
other post here today regarding this issue: If it has been reset to 2, it
means something went wrong OnConnection. When that happens, Office will
automatically reset the LoadBehavior. Try adding a try...catch block in the
OnConnection method to trap the exception.

2. If it isn't #1, could you try deleting the old registry entry and
install your addin via the setup package? Before you do that, set the
Register property for the setup project to vsdraCOM, recompile the setup
project, right click on the setup project, and click install.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
I am completly stumped here. I have developed (& supported) a
couple of
inhouse Outllook COM Addins in VB6 and am doing the latest project (a pair
of Word & Outlook addins) in VB.Net. Up until this morning everything was
working fine, I could run the addin in debug, which ran the appropriate
application, and could put stop points in the code. even
gone as far as creating a new Word addin (with only the basic bare code) and
the OnConnect code isn't even firing. The entry is in the registry and if I
set the same test addin for Outlook (i.e. add the needed registry entries)
it works fine. It's as if Word has stopped accepting addins. not a
valid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll).rebootting in case it was just Windows being odd. Anyone have any advice?
 
S

Siew Moi Khor [MS]

Hi Kevin,
Re #2, see the post I just made regarding disabled items and security
settings.

Re #3, if you delete the HKLM key and write it in HKCU instead, what
happens. I'm also wondering if doing a repair for VS or Word might help...
(So sorry to ask you to try so many things.)

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
Hi again,

The plot thickens. I created a new addin and added only the messageboxes
to confirm what events were firing.
1. Runs fine when installed. The events fire fine.
2. Will not run from Visual Studio in debug. I set the debugging 'Start
external program' property to run
C:\Program Files\Microsoft Office\Office10\WINWORD.EXE
Word is launching, but the addin is no longer running (neither with or without the stop points).
3. After attempting to run in debug mode the addin doesn't load untill it
is re-installed. There appears to have been no changes in the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Word\Addins\MyAddin.Connect
key.
Does this behavior shed any light on what's happening?

Thanks again,
Kevin

----- Kevin B wrote: -----

Hi Siew Moi,

I've investigated your two suggestions.
1. The LoadBehavior doesn't appear to be changing from 3. Adding a
Try/Catch had no effect, but I have a stop point at the OnConnect
declaration so I was pretty certian that the event wasn't just raising an
error.
2. Removing the registry key for the addin (within the Addins key)
and re-installing it didn't correct the behavior either. The Register
property for the setup project was already vsdraCOM, so nothing was actually
changed.
I did run the System Information utility (in the Accessories/System
Tools Start folder) and it shows the addin as installed & loaded. I have
tried both running within the Visual Studio with breakpoints & installing a
very basic addin that only displays messageboxes in the OnConnect and
OnStartupComplete events. The code just doesn't appear to be running.
As I said originally, an Outlook addin I'm developing works fine &
this Word addin was working earlier this week. Is there a security setting
in Word that could be keeping it from interacting with the addin?
Please feel free to email me directly. I need to resolve this as quickly as possible.

Thanks,
Kevin

----- Siew Moi Khor [MS] wrote: -----

Hi Kevin,
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? Or has it
been reset to 2 in the registry? I'm going to copy and pase now from my
other post here today regarding this issue: If it has been reset to 2, it
means something went wrong OnConnection. When that happens, Office will
automatically reset the LoadBehavior. Try adding a try...catch block in the
OnConnection method to trap the exception.

2. If it isn't #1, could you try deleting the old registry entry and
install your addin via the setup package? Before you do that, set the
Register property for the setup project to vsdraCOM, recompile the setup
project, right click on the setup project, and click install.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


Kevin B said:
I am completly stumped here. I have developed (& supported) a
couple of
inhouse Outllook COM Addins in VB6 and am doing the latest project (a pair
of Word & Outlook addins) in VB.Net. Up until this morning everything was
working fine, I could run the addin in debug, which ran the appropriate
application, and could put stop points in the code. I've even
gone as far as creating a new Word addin (with only the basic bare code) and
the OnConnect code isn't even firing. The entry is in the registry and if I
set the same test addin for Outlook (i.e. add the needed registry entries)
it works fine. It's as if Word has stopped accepting addins. is not a
valid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll). tried
rebootting in case it was just Windows being odd. Anyone have any advice?
 
K

Kevin B

Hi Siew Moi

Bingo....

I checked the Disable Items list on the About Word and the item was listed. After re-enabling the addin it now will run in debug mode

Thanks for your help

Regard
Kevi

----- Siew Moi Khor [MS] wrote: ----

Hi Kevininteracting with the addin
What is your security setting in Word? (Tools --> Macro --> Security). Tr
putting it at Medium + uncheck "Trust all installed add-ins and template"
You should be prompted whether you want to enable "mscoree.dll

Also could you check prior to that in Word, Help |---> About MS Word --
click Disable Items to see if your add-ins is listed there

Siew Mo
--
This posting is provided 'AS IS' with no warranties, and confers no rights
Sample code subject to http://www.microsoft.com/info/cpyright.ht


Kevin B said:
Hi Siew Moi
1. The LoadBehavior doesn't appear to be changing from 3. Adding
Try/Catch had no effect, but I have a stop point at the OnConnec
declaration so I was pretty certian that the event wasn't just raising a
errorre-installing it didn't correct the behavior either. The Register propert
for the setup project was already vsdraCOM, so nothing was actually changedStart folder) and it shows the addin as installed & loaded. I have trie
both running within the Visual Studio with breakpoints & installing a ver
basic addin that only displays messageboxes in the OnConnect an
OnStartupComplete events. The code just doesn't appear to be runningWord addin was working earlier this week. Is there a security setting i
Word that could be keeping it from interacting with the addin
Please feel free to email me directly. I need to resolve this as quickl as possible
Thanks Kevi
----- Siew Moi Khor [MS] wrote: ----
Hi Kevin
1. Is the LoadBehavior still 3 when OnConnection doesn't fire? O has i
been reset to 2 in the registry? I'm going to copy and pase now fro m
other post here today regarding this issue: If it has been reset t 2, i
means something went wrong OnConnection. When that happens, Offic wil
automatically reset the LoadBehavior. Try adding a try...catch bloc in th
OnConnection method to trap the exception
2. If it isn't #1, could you try deleting the old registry entr
an
install your addin via the setup package? Before you do that, se th
Register property for the setup project to vsdraCOM, recompile th setu
project, right click on the setup project, and click install
couple o
inhouse Outllook COM Addins in VB6 and am doing the latest project ( pai
of Word & Outlook addins) in VB.Net. Up until this mornin everything wa
working fine, I could run the addin in debug, which ran th appropriat
application, and could put stop points in the code even
gone as far as creating a new Word addin (with only the basic bare code) and
the OnConnect code isn't even firing. The entry is in the registry and if I
set the same test addin for Outlook (i.e. add the needed registry entries)
it works fine. It's as if Word has stopped accepting addins. not a
valid addin (but it also says that in Outlook, and it works fine there so I
suspect it's related to it being a .Net dll).rebootting in case it was just Windows being odd. Anyone have any advice?[/QUOTE]
 

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