2010-09-26 71 views
0

在Excel 2003中,我可以訪問集合Application.CommandBars以使用VBA創建自定義工具欄。在Outlook 2003中是否有相同的功能?使用VBA創建Outlook 2003工具欄

我正在嘗試更改客戶工具欄按鈕上的標籤。將來我想從頭開始創建工具欄。

乾杯,戴夫

--Trindaz上Fedang#端起來解決這個一個自己的Outlook VBAS

回答

-1

。這裏的代碼,如果你有興趣:

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 
+0

本答覆沒有解決你的原始問題有關從零開始創建自定義工具欄。 – dnLL 2013-01-28 20:00:49

+0

從頭開始創建一個工具欄是我希望將來可以做的事情。我面臨的問題是「試圖更改客戶工具欄按鈕上的標籤」,這是我的解決方案。英語是你的母語嗎?如果是這樣的話,我真的對你的思維過程是什麼引起了我的低投票感興趣。 – Trindaz 2013-01-29 03:55:32

+0

不,這不是我的母語,對不起,如果我誤解了原來的問題或聽起來很刺耳,但我正在尋找一個完整的解決方案,我覺得它應該在接受的答案,而不是,因此downvoting。您的問題的標題是「使用VBA創建Outlook 2003工具欄」,不能更明確。隨意編輯你的答案。 – dnLL 2013-01-29 14:17:03