高分请教: 如何在Word工具栏中添加一按钮? http://www.csdn.net/expert/topic/315/315757.xml?temp=.4096491 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自定义菜单和工具栏CommandBar 对象同时代表菜单和工具栏。可使用菜单或工具栏名称的 CommandBars 属性返回单独的 CommandBar 对象。Controls 属性返回一个 CommandBarControls 对象,该对象引用指定命令栏上的项。下列示例将“字数统计”命令添加至“常用”菜单。Sub AddToolbarItem() Dim btnNew As CommandBarButton CustomizationContext = NormalTemplate Set btnNew = CommandBars("Standard").Controls.Add _ (Type:=msoControlButton, ID:=792, Before:=6) With btnNew .BeginGroup = True .FaceId = 700 .TooltipText = "Word Count" End WithEnd Sub下列示例将“双下划线”命令添至“格式”工具栏。Sub AddDoubleUnderlineButton() CustomizationContext = NormalTemplate CommandBars("Formatting").Controls.Add _ Type:=msoControlButton, ID:=60, Before:=7End Sub打开宏录制器,并自定义一个菜单或工具栏,以确定某个命令的 ID 值(例如,ID 60 是 “双下划线”命令)。 在Outlook中添加自己的菜单和按钮:http://www.applevb.com/art/ar_outlook_addin.htmword编程方式与上面类似 如何在ADO取多个纪录集 我用你给的代码调试不成功 如何设置rs的属性来控制只更新多表连接中的一个表(使用了Unique Table的属性好象不管用) 此问题已是第二次提问了:来者都有分,解决者给最高分 大家好,散分! 有趣的 UDP BUG. 快睇。 请教VB6中的Msflexgrid控件Compare事件的用法 如何在treeview(可以多选)限制某个节点被选中? VB如何实现监视目录和文件的修改添加? 告诉我吧,谢谢,很简单的~~我很急呀~~~~ 关于网络编程 vb的错误处理程序请教?
CommandBar 对象同时代表菜单和工具栏。可使用菜单或工具栏名称的 CommandBars 属性返回单独的 CommandBar 对象。Controls 属性返回一个 CommandBarControls 对象,该对象引用指定命令栏上的项。下列示例将“字数统计”命令添加至“常用”菜单。Sub AddToolbarItem()
Dim btnNew As CommandBarButton
CustomizationContext = NormalTemplate
Set btnNew = CommandBars("Standard").Controls.Add _
(Type:=msoControlButton, ID:=792, Before:=6)
With btnNew
.BeginGroup = True
.FaceId = 700
.TooltipText = "Word Count"
End With
End Sub
下列示例将“双下划线”命令添至“格式”工具栏。Sub AddDoubleUnderlineButton()
CustomizationContext = NormalTemplate
CommandBars("Formatting").Controls.Add _
Type:=msoControlButton, ID:=60, Before:=7
End Sub
打开宏录制器,并自定义一个菜单或工具栏,以确定某个命令的 ID 值(例如,ID 60 是 “双下划线”命令)。
http://www.applevb.com/art/ar_outlook_addin.htm
word编程方式与上面类似