Re: Capture ALL movements...event?
- From: "BrendaLL" <BrendaLL@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Feb 2006 08:16:26 -0800
Hello! I'm trying to get this to work, because this is the type of thing I
need: http://blogs.msdn.com/pstubbs/archive/2004/12/31/344964.aspx but it is
not working. I put this function in a cell (=GetNumberFromVSTO()) but it
doesn't find that function. Can you try it and see if you can get it to
work? Wait, do you have VSTO? Sorry this post is so long, but I have
learned lots from you guys. Thanks!
"Tony Jollans" wrote:
Hi Brenda,.
I don't know whether *every* possible key combination can be trapped but the
basic code to set the trap is ...
KeyBindings.Add KeyCode:=BuildKeyCode(wdKeyW), _
KeyCategory:=wdKeyCategoryMacro, _
Command:="MyMacroForW"
And then ...
Sub MyMacroForW()
' Do whatever you want here
' Execute whatever the user expects from pressing W
' (Maybe) Do something else here
End Sub
To do this properly you will need to check beforehand what existing key
assignments there are - and (a) make sure they are honoured and (b) reassign
them afterwards.
The mouse is different. To trap mouse actions in the document you can
probably rely on WindowSelectionChange. To trap those in the interface but
outside the document you'll need to intercept every command bar control -
and I don't think you can trap things in the Task Pane but they may not all
matter.
It might all be possible - I really don't know - but it is most definitely a
major undertaking and probably a big performance hit. If I have time I might
look into it one day or --- <jest> if you want to pay me large sums of money
I might do it sooner </jest>
--
Enjoy,
Tony
"BrendaLL" <BrendaLL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:056B2ED8-3F2B-4F3B-B7B6-300AC4310441@xxxxxxxxxxxxxxxx
Hi TonyHow
I was just wondering more about the macros that you were talking about.
would I add a macro to a single keystroke? Like if I want them to hit themacro
'w' key, and perform a function behind that?
Or is there an article that talks about that?
Thanks!
"Tony Jollans" wrote:
No. There just simply isn't an event which fires off every keystroke.
It might, theoretically, be possible to assign every keystroke to a
toand perform some appropriate action, but it would be extremely difficult
somewrite and a hell of a perfomance hit and would probably still fail in
mightcases (field updates, for example). Alternatively some low level APIs
thatget you there.
For sure this won't be easy even if it's possible. Is the status bar
Wordimportant to you?
--
Enjoy,
Tony
"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AC399026-856F-40F9-87E6-D6FB62407323@xxxxxxxxxxxxxxxx
Tony
They do you have something else that you use that works better?
--
Brenda
"Tony Jollans" wrote:
Yes, it is the closest - but still quite a long way off.
--
Enjoy,
Tony
"Jonathan West" <jwest@xxxxxxxx> wrote in message
news:u8NT3PaLGHA.3896@xxxxxxxxxxxxxxxxxxxxxxx
"Brenda" <Brenda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1368F07C-B7EC-4862-A83E-9A1BDF6B89EE@xxxxxxxxxxxxxxxx
Currently I am trying to create my own StatusBar because the
MyStatusBar
doesn't display when you are using it with Internet Explorer.
triedcursor(pointer)question
is
what event do you use to capture every movement of the
so
I
can display the current line, section, column, etc...? I've
ItMe.SelectionChange but it only captures some of the movements.
WindowSelectionChangedoesn't
capture when I hit the Enter button, etc...
Any ideas? Thanks for your time!
The closest I think you can get to this is the
www.classicvb.orgevent.
The following article shows you how to write event procedures for
application-level events
Writing application event procedures
http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition
- Follow-Ups:
- Re: Capture ALL movements...event?
- From: Tony Jollans
- Re: Capture ALL movements...event?
- References:
- Re: Capture ALL movements...event?
- From: Jonathan West
- Re: Capture ALL movements...event?
- From: Tony Jollans
- Re: Capture ALL movements...event?
- From: Tony Jollans
- Re: Capture ALL movements...event?
- From: BrendaLL
- Re: Capture ALL movements...event?
- From: Tony Jollans
- Re: Capture ALL movements...event?
- Prev by Date: Error on "Kill"?
- Next by Date: Re: Parse style names into alias segments?
- Previous by thread: Re: Capture ALL movements...event?
- Next by thread: Re: Capture ALL movements...event?
- Index(es):