Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Assigning shortcuts to Custom toolbar buttons

Geek News

Assigning shortcuts to Custom toolbar buttons
"Laks" <slnarasimhan[ at ]gmail.com> 3/31/2006 2:08:35 PM
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

Re: Assigning shortcuts to Custom toolbar buttons
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 3/31/2006 10:10:37 PM
"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" <slnarasimhan[ at ]gmail.com> wrote in message news:1143814115.459478.229510[ at ]e56g2000cwe.googlegroups.com...
[Quoted Text]
> 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
>
Re: Assigning shortcuts to Custom toolbar buttons
"Laks" <slnarasimhan[ at ]gmail.com> 4/3/2006 7:47:10 AM
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

Re: Assigning shortcuts to Custom toolbar buttons
"Sue Mosher [MVP-Outlook]" <suemvp[ at ]outlookcode.com> 4/3/2006 12:31:02 PM
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" <slnarasimhan[ at ]gmail.com> wrote in message news:1144050429.962882.109390[ at ]g10g2000cwb.googlegroups.com...
[Quoted Text]
> 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
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net