PC Review


Reply
Thread Tools Rate Thread

button hotkey

 
 
Jenny Tam
Guest
Posts: n/a
 
      30th Aug 2003
Hi,

I've written an Outlook addin using VC++ and would like to know
whether it is possible to assign hotkeys (forget the real name) to
custom buttons? Currently my button is in the File menu and called
'&Export', so the user can access it by 'Alt+F+E'. However, is it
possible to assign something like 'Ctrl+E'?

I have used the ShortcutText property of the CommandBarButton.
'Ctrl+E' is shown but is not activated ...

This is what I get from MSDN about the ShortcutText property:

"You can set this property only for command bar buttons that contain
an OnAction macro"

What does this really mean?

Any help is appreciated,
Jenny
 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      6th Sep 2003
There was a discussion recently on the Outlook-dev list - see "Function
Item_Open()" thread:
http://groups.yahoo.com/group/outloo...tem_Open%28%29

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Jenny Tam" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks for your help, but I'm not familiar with windows hooks at all.
> Can you point me to some examples or references?
>
> Thanks,
> jenny
>
>
>
> "Dmitry Streblechenko" <(E-Mail Removed)> wrote in message

news:<#3r#(E-Mail Removed)>...
> > You can if you set a windows hook - SetWindowsHookEx(WH_GETMESSAGE,
> > YourHookProc, 0, GetCurrentThreadId)
> >
> > Dmitry Streblechenko (MVP)
> > http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> >
> >
> > "Jenny Tam" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > I have played with it further and may I conclude that it is NOT
> > > possible using VC++ from the Outlook addin? Quoted and summarized
> > > from MSDN below:
> > >
> > > "You can use the ShortcutText property only for command bar buttons
> > > that contain an OnAction macro, and the OnAction property sets the
> > > name of a Visual Basic procedure that will run when the button is
> > > clicked."
> > >
> > > Any help is appreciated!
> > > Jenny
> > >
> > >
> > >
> > > (E-Mail Removed) (Jenny Tam) wrote in message

> > news:<(E-Mail Removed)>...
> > > > Hi,
> > > >
> > > > I've written an Outlook addin using VC++ and would like to know
> > > > whether it is possible to assign hotkeys (forget the real name) to
> > > > custom buttons? Currently my button is in the File menu and called
> > > > '&Export', so the user can access it by 'Alt+F+E'. However, is it
> > > > possible to assign something like 'Ctrl+E'?
> > > >
> > > > I have used the ShortcutText property of the CommandBarButton.
> > > > 'Ctrl+E' is shown but is not activated ...
> > > >
> > > > This is what I get from MSDN about the ShortcutText property:
> > > >
> > > > "You can set this property only for command bar buttons that contain
> > > > an OnAction macro"
> > > >
> > > > What does this really mean?
> > > >
> > > > Any help is appreciated,
> > > > Jenny



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a hotkey to button control Bill Nguyen Microsoft VB .NET 3 22nd Jun 2007 11:44 PM
Possible to hotkey/underscore a VB button on a worksheet? =?Utf-8?B?UmljaA==?= Microsoft Excel Programming 1 17th Mar 2006 07:52 PM
Button hotkey not working =?Utf-8?B?TUpI?= Microsoft Dot NET Framework Forms 0 1st Mar 2006 03:39 PM
Is Any person know how to set a hotkey for command button? =?Utf-8?B?bWl5YWtlamVzcw==?= Microsoft Dot NET Framework Forms 5 9th Nov 2004 06:04 PM
button hotkey Jenny Tam Microsoft Outlook VBA Programming 1 6th Sep 2003 05:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 PM.