使用 VBA 创建 Outlook 2003 工具栏

发布于 2024-09-25 06:33:19 字数 208 浏览 1 评论 0原文

在 Excel 2003 中,我可以访问 Application.CommandBars 集合以使用 VBA 创建自定义工具栏。 Outlook 2003 中有类似的功能吗?

我正在尝试更改客户工具栏按钮上的标签。将来我想从头开始创建工具栏。

干杯, Dave

--Trindaz 谈 Fedang #Outlook-vbas

In Excel 2003 I can access the collection Application.CommandBars to create custom toolbars using VBA. Is there an equivalent in Outlook 2003?

I am trying to change the labels on buttons of a customer toolbar. In the future I'd like to create the toolbar from scratch.

Cheers,
Dave

--Trindaz on Fedang #Outlook-vbas

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相对绾红妆 2024-10-02 06:33:19

最终我自己解决了这个问题。如果您有兴趣,这是代码:

Dim expExplorer As Outlook.Explorer
Dim cmbCommandBar As CommandBar
Dim ctlBarControl As CommandBarControl
For Each expExplorer In Outlook.Explorers
    For Each cmbCommandBar In expExplorer.CommandBars
        If cmbCommandBar.Name = "name-of-toolbar" Then
            For Each ctlBarControl In cmbCommandBar.Controls
                If ctlBarControl.Caption = "caption-i-want-to-change" Then
                    ctlBarControl.Caption = "new-caption-text"
                End If
            Next ctlBarControl
        End If
    Next cmbCommandBar
Next expExplorer

Ended up solving this one myself. Here's the code if you're interested:

Dim expExplorer As Outlook.Explorer
Dim cmbCommandBar As CommandBar
Dim ctlBarControl As CommandBarControl
For Each expExplorer In Outlook.Explorers
    For Each cmbCommandBar In expExplorer.CommandBars
        If cmbCommandBar.Name = "name-of-toolbar" Then
            For Each ctlBarControl In cmbCommandBar.Controls
                If ctlBarControl.Caption = "caption-i-want-to-change" Then
                    ctlBarControl.Caption = "new-caption-text"
                End If
            Next ctlBarControl
        End If
    Next cmbCommandBar
Next expExplorer
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文