Word 2007 OLE: Events firing multiple times [message #538927] |
Wed, 09 June 2010 02:57  |
Eclipse User |
|
|
|
Hi All,
I have embedded Word 2007 in our SWT View using OLE. We also subscribe to some Word events - ContentControlAfterAdd, ContentControlBeforeDelete, etc
I observed that the events get triggered multiple times even for a single operation. For example, if I create a new content control in Word, I get the AfterAdd event multiple times (the Content Control argument also changes value). This seems to have some relation on the number of content controls in the document. If I already have 2 content controls in the document and now I create a third, the AfterAdd event handler gets called 5 times. As the number of content controls in the document increases, the number of times the events get triggered also increases, although I could see no definite relation between the two numbers.
I tried the same using .NET Word Addin and this behaviour is not reproduced there. So I am beginning to wonder if it's something in OLE that's causing this.
Any insights on this behaviour?
Thanks
Satish
|
|
|
Re: Word 2007 OLE: Events firing multiple times [message #539347 is a reply to message #538927] |
Thu, 10 June 2010 09:59  |
Eclipse User |
|
|
|
Have you tried asking this question in a ActiveX/Ole forum for ms word development ?
I suspect this is a bug in the ActiveX control for Word.
Also, I would not expect the .NET Word Addin to use ActiveX control for Word (what would explain why it doesn't have the bug).
You can also try to print the stack trace every time you get an event. If SWT is doing something to cause this problem it might be possible to see something suspicious being called by SWT in the stack..
|
|
|
Powered by
FUDForum. Page generated in 0.04572 seconds