Word underlined shortcuts

Add-in Express™ Support Service
That's what is more important than anything else

Word underlined shortcuts
 
Felix Pause


Guest


Hi again - this should be an easy to resolve question (i hope :) ),

i'am was told we need some smartfunctions in our Word-Addin.

What I want to express is limited because I just don't know what the proper term is for that - so let me try to explain.

in the build in Word function we have something like:
File
Print

to get fast accsess to print (so u press alt+u and than hold alt+p).

I don't see something like that in the documentation. And because I don't find a proper term for the underlined
Signs I hope you can help me out how this is possible in addin-express to use.

In our old plugin we used "&" as keyword in our xml file to tell word to underline that char.
So for example
File
Customaction
So the string woult be "&Customaction".



Thanks in Advance
Felix
Posted 04 Dec, 2014 08:07:56 Top
Felix Pause


Guest


Further Addition:

While I was trying to replace the &
I notice I can use just "&" in the text to underline it visually - but atm. this does not add the functionality
even worse it deactivates the build in shortcut for that (for example alt+f for file)

Actually that is not completly correct.
I tried it with other bars except "file"
there it works just fine.

It handles A bit strange it I try to use the file menu and have something wich start with the same button in the file menu.

in my case this is "&datei" and "&drucken a4" wich would be translated "file" and "print a4"

I actually did quite resolve my question in most regards - but could you tell me how to get around this wierd behavior.

When I deactive shortcuthandling it changes its behavior - to "normal" word-like behavior.
Otherwise if there is a addinexpress shortcut the workflow is quite different.


Thanks.
Posted 04 Dec, 2014 08:36:11 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Felix,

You can use & to indicate the hot key e.g. "&File" and "&Print". This works in the CommandBar UI only. In the ribbon UI you use the KeyTip property, that the Ribbon components provide.

I don't understand what problem with keyboard shortcuts you have.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Dec, 2014 09:59:19 Top
Felix Pause


Guest


While i let addinexpress handle the shortcuts the accellerator (should be the right term) don't work correctly.

If I turn the handling off I lose the build in control of the AddinExpress Buttons.

Ok lets try to explain the problem:

while shortcuthandling = false (normal behavior)

If i press alt+d (or alt+f for file) it open the menu and regardless of holding alt or not I can press D (for print(drucken)
It starts the process - done.

while shortcuthandling = true (strange behavior)

If i press alt+d - nothing is happening unless I have a certain shortcut for alt+d
If i tab(press and release) alt i am starting the accellerator process.
than I can press d (datei or F for english file) and the mainmenu-popupbar opens - but I am not allowed to press alt again or I screw up the process and can start over.
than the same thing in the bar - i press d for printing -> it selects the right attribute (alt not allowed)
and finally I have to press enter to start the process (If it is unique it normally automatically starts - that part is normal again)

So I guess the shortcuthandling is identifiing the accellerators as shortcuts and struggle with the word base.

Thanks
Felix
Posted 05 Dec, 2014 04:40:27 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Felix,

Could you please send me a sample project reproducing this to the support email address? You can find it in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.

What Word version are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 05 Dec, 2014 09:08:00 Top
Felix Pause


Guest


OK I will send it over in a minute (a small sample projekt).

I'm using Word 2003 and just 2003...

Best Regards
Felix
Posted 05 Dec, 2014 09:31:21 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Felix,

With your add-in (HandleShortcuts=True) registered in Word 2003 (11.841.8405) SP3 I have the following. Pressing Alt+F opens the File popup. Pressing Alt once again closes the popup. If I press P when the popup is opened, the Print dialog opens. This works in the same way if I don't register the add-in.

Please make sure that you have Office SP 3 installed. Also, try disabling all other COM add-ins. And make sure no macros are running behind the scenes.

Felix Pause writes:
than the same thing in the bar - i press d for printing -> it selects the right attribute (alt not allowed) and finally I have to press enter to start the process (If it is unique it normally automatically starts - that part is normal again)


I don't understand this. If the suggestions above don't help, please take a video and send it to the support email address. You can use Jing, it's free.


Andrei Smolin
Add-in Express Team Leader
Posted 08 Dec, 2014 08:54:55 Top
Felix Pause


Guest


I have thise Word Version 11.841.8405
And SP3.
As long as the HandleShortcuts = True they don't work for me like you described.
I guess I have to make a video for you, but this will take a little while.
Posted 11 Dec, 2014 02:30:48 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Waiting.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Dec, 2014 03:13:51 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Thank you Felix.

The video shows that you have applications from at least two Office versions installed simultaneously. This environment produces problems that cannot be solved programmatically. It is recommended that you only test and run your add-ins on machines having a single Office version installed. Here's what I replied in https://social.msdn.microsoft.com/Forums/en-US/6a267d75-8c78-4117-a4b6-c543c7a127ec/how-can-i-have-one-addin-for-all-versions-of-office?forum=officegeneral:

On multiple Office versions.

Scenario #1. You unregister your add-in on a PC with Word 2003 and Word 2007 installed. To remove custom command bars saved in normal.dot, you run Word via Automation and instead of Word 2003, Word 2007 is run. This ends with command bars hanging in Word 2003.

Scenario #2. Two Word versions are installed in a wrong order and this prevents your add-in from functioning. Wouldn't be surprised if reparing Word 2003 requires repairing also Word 2007 (again, for your add-in only). Then updating existing Office installation to add an Office feature or even an Office application, service packs etc. Note that end-user related stuff will work perfectly in these situations but your add-in will fail.

I think there're no solutions for these problems.


Mmm, now I know that there no such solutions.

Another source of possible troubles is a per-machine COM add-in loaded in Word. The point is: the COM Add-ins dialog reflects only per-user add-ins in Word 2000-2003; a per machine add-in has LoadeBehavior=3 in HKLM\Software\Microsoft\Office\Word\Addins\{the add-in}. I also recommend checking that no template containing macros is attached to the document used for tests.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Dec, 2014 04:51:17 Top