10 个解决方案
#1
可以通过录制宏来找到答案
#2
我试过了,但没有找到可以直接添加菜单名称和功能的程序,况且我想放在JAVASCRIPT里面
#3
难道没有人会吗?我觉得并不难,只是没有相关资料?
#4
Dim myMenuBar
Dim newMenu
Dim ctrl1
Dim s
Dim flag As String
'初始化菜单
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "认证"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导入"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daoru"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导出"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daochu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "删除"
ctrl1.OnAction = "shanchu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1849)
ctrl1.Caption = "查找"
ctrl1.OnAction = ""
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "帮助"
ctrl1.OnAction = "bz"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "关于"
ctrl1.OnAction = "gy"
ctrl1.Style = msoButtonCaption
End Sub
Dim newMenu
Dim ctrl1
Dim s
Dim flag As String
'初始化菜单
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "认证"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导入"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daoru"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导出"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daochu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "删除"
ctrl1.OnAction = "shanchu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1849)
ctrl1.Caption = "查找"
ctrl1.OnAction = ""
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "帮助"
ctrl1.OnAction = "bz"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "关于"
ctrl1.OnAction = "gy"
ctrl1.Style = msoButtonCaption
End Sub
#5
楼上的高人!
#6
请问我怎样将一个宏跟着文档走?
#7
也就是ONACTION的内容,能否跟着文档走?
#8
在文档中编辑宏,保存文件即可,给我信箱,我发一例子给你
#9
我现在遇到的问题在于怎样用程序将新加的按钮设为临时的,我添加上的就成为模板的了?
我的邮箱为lanckybb@263.net
我的邮箱为lanckybb@263.net
#10
怎样添加才能成为临时的呢?这样一添加模板里都有了;
那Temporary:=True起什么作用呢?
那Temporary:=True起什么作用呢?
#1
可以通过录制宏来找到答案
#2
我试过了,但没有找到可以直接添加菜单名称和功能的程序,况且我想放在JAVASCRIPT里面
#3
难道没有人会吗?我觉得并不难,只是没有相关资料?
#4
Dim myMenuBar
Dim newMenu
Dim ctrl1
Dim s
Dim flag As String
'初始化菜单
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "认证"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导入"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daoru"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导出"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daochu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "删除"
ctrl1.OnAction = "shanchu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1849)
ctrl1.Caption = "查找"
ctrl1.OnAction = ""
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "帮助"
ctrl1.OnAction = "bz"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "关于"
ctrl1.OnAction = "gy"
ctrl1.Style = msoButtonCaption
End Sub
Dim newMenu
Dim ctrl1
Dim s
Dim flag As String
'初始化菜单
Set myMenuBar = CommandBars.ActiveMenuBar
Set newMenu = myMenuBar.Controls.Add(Type:=msoControlPopup, _
Temporary:=True)
newMenu.Caption = "认证"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导入"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daoru"
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "文件导出"
ctrl1.Style = msoButtonCaption
ctrl1.OnAction = "daochu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "删除"
ctrl1.OnAction = "shanchu"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1849)
ctrl1.Caption = "查找"
ctrl1.OnAction = ""
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "帮助"
ctrl1.OnAction = "bz"
ctrl1.Style = msoButtonCaption
Set ctrl1 = newMenu.Controls.Add(Type:=msoControlButton, ID:=1)
ctrl1.Caption = "关于"
ctrl1.OnAction = "gy"
ctrl1.Style = msoButtonCaption
End Sub
#5
楼上的高人!
#6
请问我怎样将一个宏跟着文档走?
#7
也就是ONACTION的内容,能否跟着文档走?
#8
在文档中编辑宏,保存文件即可,给我信箱,我发一例子给你
#9
我现在遇到的问题在于怎样用程序将新加的按钮设为临时的,我添加上的就成为模板的了?
我的邮箱为lanckybb@263.net
我的邮箱为lanckybb@263.net
#10
怎样添加才能成为临时的呢?这样一添加模板里都有了;
那Temporary:=True起什么作用呢?
那Temporary:=True起什么作用呢?