Word 2002 and Visual Basic .NET

R

Raju Joseph

Hi All

I am automating Word 2002 (XP) from my Visual Basic .NET application. I have
sinked the application events. Also, I want to prevent user from selecting
'New' and 'Open' menu items under 'File' menu as well as the 'New' and
'Open' toolbar buttons on 'Standard' toolbar.

I have successfully handled this also by sinking the events corresponding to
CommandBarButton object.

Here is the problem.

HOW DO I TRAP THE KEYBOARD SHORTCUTS?

When the user presses CTRL+N, a new document is opened. Same for CTRL+O.

Please help. Any thoughts or suggestions? Is there any way I can sink the
keyboard events?

Thank You....

Raj
 
C

Cindy Meister

If all you want to do is to disable them, you should be able to do this using
the KeyBindings object. You want to be careful, however, to affect ONLY the
document(s) you're automating. IOW, be careful to set the
CustomizationContext correctly.

-- Cindy
 
C

Cindy Meister

I don't think there is any way to trap keyboard assignments in an application
outside of Word. The code needs to be in a local Word project, at the very
least, as a call-back to an Addin.

-- Cindy
 

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