📄 vba11-2.txt
字号:
Public Sub NewMenu()
' Find the Main menu bar.
Dim pMainMenuBar As ICommandBar
Set pMainMenuBar = ThisDocument.CommandBars. _
Find(ArcID.MainMenu)
' Create the new menu called "MyMenu"
' on the MainMenuBar.
Dim pNewMenu As ICommandBar
Set pNewMenu = pMainMenuBar.CreateMenu("MyMenu")
' Add a built in command to the new menu.
pNewMenu.Add ArcID.File_AddData
' Add your VBA macro to the new menu.
pNewMenu.CreateMacroItem "MyCommand", 0, _
"Project.ThisDocument.ShowTime"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -