WindowSelectionChange: broken in Word 2003

C

Chango Valtchev

Hello,

The WindowSelectionChange event appears broken in Word 2003: It fires before
the selection is actually changed. The Selection object that is passed to
the event handler reflects the old selection too. This completely breaks our
existing application (for Word 2000/2002), which relies critically on this
event. I'm sure many other people will make the same bitter discovery. Any
workaround? MS folks: any hope this will be fixed soon?

//
 
C

Cindy M -WordMVP-

Hi Chango,
The WindowSelectionChange event appears broken in Word 2003: It fires before
the selection is actually changed. The Selection object that is passed to
the event handler reflects the old selection too.
FWIW, I'm not seeing this behavior at all. I set up a test with a very simply
bit of code: just a MsgBox Sel.Text in the event. It gives me the NEW
selection.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
C

Chango Valtchev

Hi Cindy,

Thanks for the response! For a while you made me think I probably dreamed up this bug. ;-) But I was able to reproduce it again when I realized it took a bit more: The WindowSelectionChange event faults when you move the selection into and out of a document range that has an XML element around it. Then the handler gets the old selection. That's the setup in our existing application, that's why I initially assumed the event was broken altogether. Well, it still appears broken in a pretty major way... We were able to partly work around the problem by using the new XMLSelectionChange event. I hope Microsoft fixes this bug.

Thanks again.

// Chango
 

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