http://www.csdn.net/expert/topic/315/315757.xml?temp=.4096491

解决方案 »

  1.   

    自定义菜单和工具栏
    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 是 “双下划线”命令)。
      

  2.   

    在Outlook中添加自己的菜单和按钮:
    http://www.applevb.com/art/ar_outlook_addin.htm
    word编程方式与上面类似