Has anyone found that the OWC events stop firing after the VBA project references are programmatical

B

bigdaddy

I have a complex word DOT template file that includes the OWC
spreadsheet control (The Office XP version).

We have some code that automatically removes MISSING: references:

Private Sub RemoveMissingReferences()
Dim myRef
For Each myRef In ActiveDocument.VBProject.References
If myRef.IsBroken Then
ActiveDocument.VBProject.References.Remove myRef
End If
Next
End Sub

The problem is that once this code executes (and removes a missing
reference) the events for the OWC controls no longer fire (StartEdit,
EndEdit, etc.)

Does anyone know how to prevent this from happening?

Any advice would be greatly appreciated. I know the OWC controls are
nearing end of life, but this is a large, complex system that will be
needed for at least the next year.
 
A

Alvin Bruney [MVP]

What does remove reference do? what is a reference? If it is what i think it
is, then the removal actual unchains the event wire up resulting in no
events.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 

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