Catching ALT-F4 event

J

Jørgen Vig

I have made som event-handling, in word 2003, on beforesave and
beforeclose. It works fine, when I close word in a normal way. Except,
when I press ALT+F4.
Is ALT+F4 overrouling som eventhandling i VBA, and how do I catch it?
In Windows Forms, I think there is a Activewindow_close event - but in
my macro, there is no forms.
 
J

Jørgen Vig

Hi Jorgen:

The code is as such-

Findkey(BuildKeyCode(wdkeycontrol, wdkeyF4)).disable

More discussion can be found here-

http://support.microsoft.com/default.aspx/kb/192320

Where your code should go is here-

http://i38.photobucket.com/albums/e103/alborgmd/Software/disablectrlf...

That should work for you. Please post any problems that you have...

Al





- Vis tekst i anførselstegn -

H Al,

Thanks a lot for your advice. I got stocked in the project, but I knew
there had to be a way to code it in VBA. When I had send this request,
I found another way, by getting into the Tools | Customize |
keyboard ... then you can overroule the Word default keyboard setting.

Jorgen
 

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