Hallo,
I found some code to make new Menu's in the TopMenuBar ("OfficeMenuBar")
Sub _CreateMenu()
oConfigAccess = GetConfigAccess(
"/org.openoffice.Office.Addons/AddonUI", True )
oElement = oConfigAccess.getByName( "OfficeMenuBar" )
oMenu = oElement.createInstance()
oMenu.Title = "PMG_macros"
oMenu.Context = "com.sun.star.text.TextDocument"
' Create the menu items and add them to the menu.
oMenuItem = MakeMenuItem( oMenu.Submenu, "Export", "menu01",
"macro:///LibrarieName.ModuleName.sub1" )
oMenuItem = MakeMenuItem( oMenu.Submenu, "", "menu01s",
"private:separator" )
oMenuItem = MakeMenuItem( oMenu.Submenu, "import", "menu02",
"macro:///LibrarieName.ModuleName.sub2" )
oMenuItem = MakeMenuItem( oMenu.Submenu, "", "menu02s",
"private:separator" )
oMenuItem = MakeMenuItem( oMenu.Submenu, "emial", "menu03",
"macro:///LibrarieName.ModuleName.sub3" )
oMenuItem = MakeMenuItem( oMenu.Submenu, "about", "menu04",
"macro:///LibrarieName.ModuleName.sub4" )
oElement.insertByName( "org.openoffice.Office.addon.PMG_macros",
oMenu )
oConfigAccess.commitChanges()
End Sub
But the added menu's are placed between the existing "Tools" and
"Windows" menu. This place can even with the UI not been altered.
because they are not visible for the UI
So , my questions:
-can the place of the new Menu's been altered by the API
-why are the not visible for the UI
Thanks for any hint
Fernand
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]