#1
|
|||
|
|||
Word counter with x word alert
Hi!
I am unable to find a feature or a macro or a add-on for word that would allow me this: I want to be alerted (by a pop up window, or just a ding sound) every x words written (for instance, every 1000 words). This is a productivity helper for me. Does anyone know how to approach this? I know there is a built-in word counter in word, but I don't know how to harness that to my purpose. Thanks! |
#2
|
||||
|
||||
We generally avoid this sort of thing because it would require a macro to run on every single edit and keystroke.
Can we talk you into another option that is less CPU-intensive? Like do the count when the document is saved.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thanks, but the whole purpose is to have a counter running in the background and popping up notifications/alerts when I reach X number of words. If it counts when I save, it defeats the purpose.
|
#4
|
||||
|
||||
Word has no in-built facility for this. You can, of course, have Word display a word count on the status bar. Anything more sophisticated would entail a complex macro that hooks into Windows itself for the monitoring.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
||||
|
||||
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 |
#6
|
|||
|
|||
You can use the Application.onTime event to run a specified macro at a certain time. So if you set up a macro to run every X minutes this should give you the feedback you are seeking.
|
#7
|
||||
|
||||
The problem there, though, is that the WindowSelectionChange event only fires when you change the selection - which doesn't happen while you're typing. Hence it won't tell you when you've reached a certain word count.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
counter, macro, word 2016 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
help creating a dollar counter add-in | dstallworth | PowerPoint | 0 | 04-23-2017 12:49 PM |
Using a display alert command in Word | ch1325 | Word VBA | 2 | 04-30-2016 06:50 AM |
How to dismiss/avoid warning/alert dialog boxes in Microsoft.Office.Interop.Word.Document | meenagrace | Word VBA | 3 | 11-07-2014 01:29 PM |
Recipient counter in Mail Merge Wizard displays only one digit in Word | Liuneddu | Word | 1 | 08-13-2013 03:57 AM |
Visitor counter on my webpage in Word | jwhbos | Word | 0 | 02-13-2010 04:21 AM |