View Single Post
 
Old 06-11-2018, 03:07 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You could use the WindowSelectionChange event which won't fire on every single thing you can do in the file but will fire annoyingly often.
https://msdn.microsoft.com/en-us/lib...or=-2147217396

Your code would need to store a variable to track the previous incremental value so that the word count can be compared against that to see when an increment has tripped the trigger
eg. Start with a value of zero words, the trigger stores this value and then the code keeps firing but the code effectively does nothing until you trip past 1000 words and the sound plays and the new stored value is 1000. If the user deletes words to go below 1000 or pastes/types words to go past 2000 then the sound plays again and the stored value is reset.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote