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
Hi,

i want to add an context menu to Word 2007. I added an ADXContextMenu, set the SupportedApp to Word, and the CommandBarName to Text or Tables or System etc. - but the Item dont show up. In Word 2003 it works?

thx
Posted 28 Jun, 2009 12:17:44 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
PS: My Word Addin lives in an AddidionalModule which i load in the _OnRibbonBeforeCreate Event
Posted 28 Jun, 2009 12:28:35 Top
Hannes Koidl




Posts: 310
Joined: 2008-05-19
PS: My Word Addin lives in an AddidionalModule which i load in the _OnRibbonBeforeCreate Event

this.Modules.Add(new ADXAddinAdditionalModuleItem(this.components) { ModuleProgID = Constants.ProgIdWord2007 });
Posted 28 Jun, 2009 12:28:55 Top
Andrei Smolin


Add-in Express team


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

In How to develop the modular architecture of your COM add-in , we use AddinInitialize. Try using it, too.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2009 10:13:55 Top
Hannes Koidl




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

when i use AddinInitialize then the Ribbons dont get loaded - thats why i used OnRibbonBeforeCreate. But i also tried AddinInitialize, didnt work either!
Posted 29 Jun, 2009 10:16:59 Top
Andrei Smolin


Add-in Express team


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

Does adding an item to Text, Tables, System, etc work in a test add-in?

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2009 10:25:31 Top
Hannes Koidl




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

it works if i add it to the Main Module - but i dont get it work with an AdditionalModule - but this is what i need...
Posted 29 Jun, 2009 11:12:02 Top
Andrei Smolin


Add-in Express team


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

Oh, I see. Try using two additional modules: a) with Ribbon controls - add it to the Modules collection in OnRibbonBeforeCreate; b) with command bar components - add it to the Modules collection in AddinInitialize.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2009 11:31:54 Top
Hannes Koidl




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

i already tried to add the Module in the AddinInitialize, i work with the ADXContextMenu component - but no success?
Posted 29 Jun, 2009 13:01:01 Top
Hannes Koidl




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

sorry for the last Post - you are right - when i add it in the AddinInitialize it looks better. Do you know why this is?

Currently i have seperated my Modules in Word2000-2003, and one Word2007 Module.

Word2000-2003 i add in the AddinInitialize
Word2007 i add in the OnRibbonBeforeCreate

so for Word2007 i would now need another Module. Now way around here?

thx
Posted 29 Jun, 2009 13:12:09 Top