Word Crashes Using Built-in Control to Intercept Permissions

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

Word Crashes Using Built-in Control to Intercept Permissions
 
Les Potter




Posts: 2
Joined: 2012-11-09
In WORD, I am trying to intercept the File->Info->Permissions button click (aka Protect Document). I am using the ADX Built-in Control. I set the ID = 9004. It does not fire my event handler for ActionEx. Instead, clicking the Permissions button displays a menu, then clicking the "Restrict Permission By People->Restrict Access" results in Word crashing.

I am developing with VS 2012 and Office 2010. I am running under the debugger.
Posted 09 Nov, 2012 10:22:15 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Hello Les,

ADX Built-in Control is designed to intercept built-in CommandBar controls and it cannot intercept a built-in Ribbon control. I suggest that you check these sections in {Add-in Express}\Docs\adxnet.pdf on your PC:
- Referring to Built-in Ribbon Controls
- Intercepting Built-in Ribbon Controls

As you probably know, the tooltip of a Ribbon control in the Customize Ribbon dialog displays the IdMso of that control. I've used this fact to find the IdMso of the controls shown in the menu "Restrict Permission By People", they are:

- "Restricted Access" - FilePermissionDoNotDistribute (note, that this is a toggle button)
- "Unrestricted Access" - FilePermissionUnrestricted (this is a toggle button, too)
- "Manage Credentials" - FilePermissionRestrictAs (this is a regular button)

I've added three Ribbon Command components on the add-in module and set their IdMso and ActionTarget properties to reflect the information above. After registering the add-in and running Word I've found that the commands above aren't interceptable in Word 2010.

I was unable to google out anything of value about this problem.

Can you please confirm my findings?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Nov, 2012 04:38:07 Top
Les Potter




Posts: 2
Joined: 2012-11-09
I had tried both Ribbon Command Component first with no luck either. That's when I tried the Built-in Command Component. So, is there no way to intercept these controls?
Posted 13 Nov, 2012 11:39:15 Top
Andrei Smolin


Add-in Express team


Posts: 14115
Joined: 2006-05-11
Les,

Can you please record a VBA macro while choosing any of these options? If the macro sets some property(ies) of some object(s) then you can check if the property(ies) are modified in the OnHide event of the ADXBackstageView component that is after BackstageView is closed. Note however that the end user can modify the Ribbon by adding these options to a Ribbon tab; there's no suitable event in this case.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Nov, 2012 02:42:54 Top