home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 November
/
Pcwk1197.iso
/
LOTUS
/
Eng-ins
/
ACROREAD
/
SUITE
/
DW10_S7.LSS
< prev
next >
Wrap
Text File
|
1996-09-30
|
2KB
|
49 lines
Option Public
Sub CustomMenu
' Set constants for the menu and menu item titles.
Const MenuName = "&My Menu"
Const Option1 = "&First Menu Option"
Const Option2 = "&Second Menu Option"
Const Option3 = "&Third Menu Option"
' Create two menu item variables.
Dim CrntMenu As MenuItem
Dim MyMenu As MenuItem
' Set the variable CrntMenu to the Word Pro main menu
' object LwpMenuBar.
Set CrntMenu = .ApplicationWindow.LwpMenuBar
' If the menu item already exists in order to prevent' duplicates.
CrntMenu.DeleteItem MenuName
' Create My Menu as a main menu item on the Word Pro menu
' bar. Set the 3rd paramter of NewItem to False. Specify
' where MyMenu will display by giving the 4th parameter
' the name of the main menu item it should come before.
CrntMenu.NewItem MenuName, "",False,"&Help"
' Set the variable MyMenu to newly created main menu item.
Set MyMenu = CrntMenu.Items.Item(MenuName)
' Add the first two menu items to the new main menu item
' and associate the menu items with the sub MenuSelection.
MyMenu.NewItem Option1,"!MenuSelection",,
MyMenu.NewItem Option2,"!MenuSelection",,
' Create a seperator line on the menu
MyMenu.NewItem "-","",,
' Add the last menu item to the new main menu item and
' associate the menu items with the sub MenuSelection.
MyMenu.NewItem Option3,"!MenuSelection",,
End Sub
Sub MenuSelection
' Create a message box to display when a menu item is
' selected
Messagebox "A Menu Item was Selected!",64,"Menu Example"
End Sub