Menu Separators in Word

H

HaySeed

I'm using C# to automate a Word session. At the start of the session I build
a custom set of menu items under the "Tools" CommandBar.

2 Questions:

1) How do I add a menu Separator into my custom menus

2) How do I add a new Item to the top menu Command Bar.
(When I try wordApp.CommandBars.Add() - I create an undocked Tool bar
instead of adding a menu item.)
 
T

Tony Jollans

1. As far as I know you can't explicitly add a separator. Instead, set to
True the BeginGroup property of the control you want immediately after the
separator.

2. Your (new) Item will be a Control on the Menu Bar so do it with:

wordApp.CommandBars("Menu Bar").Controls.Add(Type:=msoControlPopup)
 
H

HaySeed

Thanks Tony


Tony Jollans said:
1. As far as I know you can't explicitly add a separator. Instead, set to
True the BeginGroup property of the control you want immediately after the
separator.

2. Your (new) Item will be a Control on the Menu Bar so do it with:

wordApp.CommandBars("Menu Bar").Controls.Add(Type:=msoControlPopup)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top