Word 2007 Context Menu

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

Word 2007 Context Menu
 
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Hmm its still 2008.4.4.1918 online Andrei?
Posted 13 Jul, 2009 18:00:50 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Hannes,

Oh, this is fixed in 2009.5.1.2022.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 14 Jul, 2009 06:46:41 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Hi Andrei,

i testet this now with the new build. The bug with the Temporary switch is fixed - but my context menu is still there after i unregister my addin's !! its quite urgent now... :(

Posted 29 Jul, 2009 16:04:00 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Hannes,

I've created a simple project showing a custom button in the Text Context menu. Download the project here: http://www.add-in-express.com/files/projects_pub/as/MyAddin217.zip

If you have Office Live add-in, set its LoadBehavior to 0 (HKLM\Software\Microsoft\Office\Word\Add-ins\OLConnectorAddin.Connect).

I've registered and unregistered the project from VS 2005; I can't see any problems.

Below is a simple macro that resets the Text context menu and in this way deletes any custom context menu items:

Private Sub ContextMenuClear()
Dim cb As Office.CommandBar
Set cb = Application.CommandBars.Item("Text")
cb.Reset
End Sub


In Word, press Alt+F11 to open the VBA IDE, open any class or module, paste the macro, our the text cursor on any line of the macro and press {F5}.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jul, 2009 08:32:52 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Hi Andrei,

i sent you the modified project back to the support mail - as i wrote at the beginning of the post i use the context menu in an additional module. and it looks like in this case it does not work !
Posted 30 Jul, 2009 10:16:53 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Hi Hannes,

When I unregister the project containg the additional module, the buttons are gone.

How do you register this assembly in your setup project?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jul, 2009 13:21:57 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Hi Andrei,

thats what i do:

Register AdditionalModule
Register MainModule
Start Word
Unregister AdditionalModule
Unregister MainModule...
Posted 30 Jul, 2009 13:46:12 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
PS - i dont register it with an setup - i register unregister it within VS!
Posted 30 Jul, 2009 13:49:18 Top
Andrei Smolin


Add-in Express team


Posts: 16670
Joined: 2006-05-11
Hannes,

I've changed MyAddin217.AddinModule.UninstallControls() as follows:

public override void UninstallControls()
{
this.Modules.Add(new AddinExpress.MSO.ADXAddinAdditionalModuleItem(this.components) { ModuleProgID = "MyAdditionalAddin217.AddinAdditionalModule1" });
base.UninstallControls();
}

Register AdditionalModule
Register MainModule
Start Word - buttons are here.
Close Word
Unregister MainModule
Start Word - buttons are gone.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 31 Jul, 2009 07:58:07 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Thx Andrei, i will test it later.

What is the difference now. Does it always work with an Setup - you say it workes on your machine.

Is this public override void UninstallControls() only needed for VS ?
Posted 31 Jul, 2009 08:03:56 Top