Word 2007 Context Menu

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

Word 2007 Context Menu
 
Andrei Smolin


Add-in Express team


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

Because you need to use Ribbon, there's no other way.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jun, 2009 07:11:49 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Thx Andrei - i think i got it now. Last Question, when i add a Context Menu and i unregister my Addin on my Dev Pc - the ContextMenu Button i still visible in Word - doesnt matter if i set temporary to tru or false?

thx
Posted 30 Jun, 2009 10:11:51 Top
Andrei Smolin


Add-in Express team


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

All command bars and command bar controls in Word must be non-temporary (Temporary = false). And context menus in Word are command bars.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jun, 2009 11:51:45 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
Hi Andrei - when i set it to false - and then unregister the Addin via VS they are still there - do i miss something?
Posted 30 Jun, 2009 12:22:36 Top
Andrei Smolin


Add-in Express team


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

Try registering the project, running Word, closing Word, and unregistering the project once again.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Jun, 2009 12:41:18 Top
Hannes Koidl




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

no - i doesnst work. Clean Word without Addin, Register Addin, ContextMenu is shown. Closing Word - Unregistering both, AdditionalModule and MainAddin - starting Word - ContextMenu is still there!?
Posted 01 Jul, 2009 15:39:40 Top
Tim Francis




Posts: 5
Joined: 2009-06-22
I had the same problem and this is what I did in "BeforeUninstallControls"

        Dim oBar As Office.CommandBar
        For Each oBar In WordApp.CommandBars
            If oBar.Type = Office.MsoBarType.msoBarTypePopup Then
                Dim oControl As Office.CommandBarControl
                For Each oControl In oBar.Controls
                    If oControl.BuiltIn = False Then
                        If oControl.Caption = "MyCaption" Then
                            oControl.Delete()
                        End If
                    End If
                Next
            End If
        Next


I don't think it is the best thing to do but I had to move on.
Posted 01 Jul, 2009 16:21:03 Top
Andrei Smolin


Add-in Express team


Posts: 16481
Joined: 2006-05-11
Thank you Tim!

Hannes,

It looks like you still have Temporary = True either in the ContextMenu component or in your item(s).

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2009 13:37:33 Top
Hannes Koidl




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

i just did again an test. deleted the normal.dot, Temporary = False, Register Addin, Context Menu is there, Unregister Addin, Context Menu is still there!?
Posted 06 Jul, 2009 12:57:36 Top
Hannes Koidl




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

looks like there is something strange in ADX. When i set Temporary to False, after i close and reopen the Addidional Module Temporary is then again on TRUE - looks like the settings in the Designer arent saved? I set the Temporary = false now per code in the InitializeComponent - but also without success?
Posted 07 Jul, 2009 03:53:08 Top