gregsedwards
Instructor
Hi all,
I am trying to add a custom menu with commands that run various macros I've written into the project file. I could create the toolbars manually, but I want them tied to the MPP file, not my installation of Project. So I'm trying to create the menu and commands programmatically.
I know this a pretty common thing in Office apps. You typically tie the code that builds your toolbars to an file-level event handler, such as Project_Open(), and you destroy the custom tools in conjunction with another event handler, like Project_BeforeClose(). It's the in-between coding that baffles me.
Could anyone explain how you append a new menu to the end of the main menu bar, load it up with a few menu commands, and tie those menu commands to macros? If you're feeling generous, a few code snippets would really be helpful. Thanks in advance!
- Greg
I am trying to add a custom menu with commands that run various macros I've written into the project file. I could create the toolbars manually, but I want them tied to the MPP file, not my installation of Project. So I'm trying to create the menu and commands programmatically.
I know this a pretty common thing in Office apps. You typically tie the code that builds your toolbars to an file-level event handler, such as Project_Open(), and you destroy the custom tools in conjunction with another event handler, like Project_BeforeClose(). It's the in-between coding that baffles me.
Could anyone explain how you append a new menu to the end of the main menu bar, load it up with a few menu commands, and tie those menu commands to macros? If you're feeling generous, a few code snippets would really be helpful. Thanks in advance!
- Greg