使用VBA创建Outlook 2003工具栏
-
05-10-2019 - |
题
在Excel 2003中,我可以访问该系列 Application.CommandBars
使用VBA创建自定义工具栏。 2003年Outlook是否有等效的?
我正在尝试更改客户工具栏按钮上的标签。将来我想从头开始创建工具栏。
欢呼,戴夫
- Fidang#Outlook-VBAS上的Trindaz
解决方案
最终自己解决了这个问题。如果您有兴趣,这是代码:
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
不隶属于 StackOverflow