Different menus with the same name in Word and Outlook

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

Different menus with the same name in Word and Outlook
 
Ole Andreas Ringdal


Guest


I've got two addins, one for Word and one for Outlook, that I'm developing for one of our customers. I want to add a custom dropdown menu to the Outlook inspector (on the "Menu Bar") as well as to Word, each menu having the same name but with different buttons/controls on them.

The Outlook menu will be named (something similar to) "My Client", and should contain one button, "Save email and attachments" (which saves those to a certain network location). It should only appear in the Outlook inspector for existing/received emails, and not in the Word email-editor.

The Word menu will be named "My Company" also, and should contain one button, "Save to the Document Area" (which saves the document to a certain network location). It should appear in stand-alone Word, and not when Word is used as Outlook's email editor.

When struggling back and forth with this, I end up having duplicate like-named menus, empty menus, menus not appearing, menus with the wrong contents, all sorts of weirdness... I can't really remember all the issues I've had, and I've deleted the failed experiments (in frustration).

Word is being used as Outlook's email editor, and I've followed the WordInOutlook and WordInOutlook2 examples, which prevent Word command bars from appearing in Outlook inspectors and vice versa. While I've struggled a bit with these examples, I believe I've at least partly understood them. (Don't know if they're relevant or not.)

I presume the problem is two-fold: First, one has the issue of menus with the same name in Word and Outlook, but with different contents for each application. Second, there is the issue of hiding the controls for the other, irrelevant application, similar to what is explored in the WordInOutlook and WordInOutlook2 examples.

Has anyone else struggled with like-named menus with different contents for each application?

Regards,
Ole Andreas
Posted 24 Aug, 2006 03:44:29 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Ole Andreas.

I developed an example based on your requirements.
Please download it here:
http://www.add-in-express.com/projects/wordeditorinoutlook.zip
Posted 25 Aug, 2006 13:24:46 Top
Ole Andreas Ringdal


Guest


Hello Sergey,

Thanks a lot for the example. I'll have a look at it and see what I can figure it out, but first I'll have to try to to convert it to VB since I use VB in VS2005 (latest ADX version).

Btw, since you've made one example here, does this mean that the best solution to my problems is to incorporate both addins (one for Word and one for Outlook) into a single one?

Best regards,
Ole Andreas
Posted 27 Aug, 2006 03:12:32 Top
Ole Andreas Ringdal


Guest


[Edited]

Sergey,

One of the main problems I run into with my addins is that I would like one menu in Word and one menu in Outlook inspector. Those two menus will have the same name, but contain different items according to the application or function the window serves. In your example, the Word menu is called "My Company" and the Outlook inspector menu is called "My Client".

But for the time being, I'll settle for the solution Ryszard Krakowiak came up with in http://www.add-in-express.com/forum/read.php?FID=5&TID=1110, namely dropping the use of keyboard shortcuts since that stopped the jumping/flickering.

Best regards,
Ole Andreas
Posted 27 Aug, 2006 04:32:33 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Ole Andreas.

You just need to set the same Caption for both menus in Word and Outlook inspector.
Posted 29 Aug, 2006 06:45:44 Top
Ole Andreas Ringdal


Guest


Sergey,

I tried just that, but they still showed up as two menus when Word was opened as an email editor. Two menus with the same name, that is.

Rgrds,
Ole A.
Posted 29 Aug, 2006 15:40:57 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Ole Andreas.

Please open the COM Add-ins dialog and check if the add-in is loaded in both applications: Word and Outlook.
Do you see two menus when you create a new mail?
Posted 31 Aug, 2006 15:08:05 Top