开发者

Word 2007 Macro Help

开发者 https://www.devze.com 2023-02-03 17:17 出处:网络
I\'m working on a school project on typing speed. In order to capture the user\'s characters per minute, I thought a Word macro would be useful, since they\'ll be typing only in Word.

I'm working on a school project on typing speed. In order to capture the user's characters per minute, I thought a Word macro would be useful, since they'll be typing only in Word.

I'm not looking to make a full keylogger -- simply something that counts how many characters the user has typed. I've searched for topics like this elsewhere, but they always seem to end开发者_StackOverflow with someone responding "We don't support this kind of coding" or something like that.

Could anyone point me towards a useful tutorial? I'm not so good with visual basic.


Well, word doesn't support any events to that you could hook into to track WHEN a use actually types characters, which would make it tough to track speed.

About the best you could do in native word macros would be to setup a timer, then, at regular timed intervals (say, every second) grab the activedocument, and check the length of the .content property.

that would be a pretty crude analog for chars per second though.

There's tons of stuff on word macros on the internet, just google "Word VBA examples" for a pile of 'em

0

精彩评论

暂无评论...
验证码 换一张
取 消