A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Assigning shortcuts to Custom toolbar buttons



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 31st 06, 03:08 PM posted to microsoft.public.outlook.program_addins
Laks
external usenet poster
 
Posts: 5
Default Assigning shortcuts to Custom toolbar buttons

Hi,

I want to add a toolbar button and assign a short cut to this button. I
am using .NET Extensibility/C# to do this. I have been able to add this
button and I have set the caption with the standard windows '&' and am
able to access the button with Alt combination accelerators. However, I
also noticed that the CommandBarButton has a ShortCutText property and
after googling this up a bit, I found that this would only work for
those buttons that have an associated OnAction. My add-in is a 'Load On
Demand' add-in and thus my OnAction property would read something like

button.OnAction = "!MyAddIn.Connect";

And after this, I have

button.ShortCutText="Ctrl+G";

But after the add-in loads, Ctrl+G does not cause anything. Setting the
ShortCutText property does not seem to have made any difference. Am I
doing anything wrong here?

And one more question is that if I assign already existing Outlook
shortcuts (like ctrl+n for example) to my button, what would happen?

Any help is greatly appreciated. Thanks in advance.

Regards,
Laks

  #2  
Old March 31st 06, 11:10 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Assigning shortcuts to Custom toolbar buttons

"Text" is the key word here. All that property does is add text to the visible caption. Outlook custom toolbar buttons support only Alt+ accelerators.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Laks" wrote in message oups.com...
Hi,

I want to add a toolbar button and assign a short cut to this button. I
am using .NET Extensibility/C# to do this. I have been able to add this
button and I have set the caption with the standard windows '&' and am
able to access the button with Alt combination accelerators. However, I
also noticed that the CommandBarButton has a ShortCutText property and
after googling this up a bit, I found that this would only work for
those buttons that have an associated OnAction. My add-in is a 'Load On
Demand' add-in and thus my OnAction property would read something like

button.OnAction = "!MyAddIn.Connect";

And after this, I have

button.ShortCutText="Ctrl+G";

But after the add-in loads, Ctrl+G does not cause anything. Setting the
ShortCutText property does not seem to have made any difference. Am I
doing anything wrong here?

And one more question is that if I assign already existing Outlook
shortcuts (like ctrl+n for example) to my button, what would happen?

Any help is greatly appreciated. Thanks in advance.

Regards,
Laks

  #3  
Old April 3rd 06, 08:47 AM posted to microsoft.public.outlook.program_addins
Laks
external usenet poster
 
Posts: 5
Default Assigning shortcuts to Custom toolbar buttons

Thanks very much Sue.
Is there anyway in which I can add a control to a Menu or somewhere and
associate a workable shortcut to it?

I need to add a functionality to Outlook that moves the selected
mail(s) to a specified folder on using a short cut. (Like Ctrl+D moves
the items to deleted items folder). I intially thought adding a custom
toolbar button, assigning a short cut to it and hiding it would work.
But now that I cannot add a short cut to this button, is there any
other way of achieving this?

Thanks and Regards,
Laks

  #4  
Old April 3rd 06, 01:31 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Assigning shortcuts to Custom toolbar buttons

You would need to use a toobar button with an Alt+ accelerator.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Laks" wrote in message oups.com...
Thanks very much Sue.
Is there anyway in which I can add a control to a Menu or somewhere and
associate a workable shortcut to it?

I need to add a functionality to Outlook that moves the selected
mail(s) to a specified folder on using a short cut. (Like Ctrl+D moves
the items to deleted items folder). I intially thought adding a custom
toolbar button, assigning a short cut to it and hiding it would work.
But now that I cannot add a short cut to this button, is there any
other way of achieving this?

Thanks and Regards,
Laks

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a custom toolbar Rhonda Outlook and VBA 6 January 30th 07 08:28 AM
Toolbar button to evoke a custom view ? [email protected] Outlook - General Queries 1 March 20th 06 01:30 PM
missing voting buttons, missing response toolbar [email protected] Outlook - General Queries 4 March 1st 06 04:49 PM
Some Toolbar Buttons missing in OE 6.0 ajhale Outlook Express 1 February 4th 06 04:49 PM
Toolbar Buttons Disppear Donniebb Outlook Express 1 January 30th 06 08:48 PM


All times are GMT +1. The time now is 11:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.