如何在 Outlook 啟動時自動開啟多個 Outlook 視窗?
當您在啟動 Outlook 帳戶時,通常只會開啟郵件視窗。是否能讓 Outlook 在啟動時自動同時開啟其他視窗,例如郵件、行事曆、連絡人與工作視窗?
使用 VBA 程式碼,在 Outlook 啟動時自動開啟多個 Outlook 視窗
使用 VBA 程式碼,在 Outlook 啟動時自動開啟多個 Outlook 視窗
在此,我提供一段 VBA 程式碼,協助您在啟動 Outlook 時立即開啟多個 Outlook 視窗,例如郵件、行事曆、聯絡人與工作視窗。請依照下列步驟操作:
1. 按住 ALT + F11 鍵,即可開啟 Microsoft Visual Basic for Applications 視窗。
2. 在 Microsoft Visual Basic for Applications 視窗中,於 Project 1 (VbaProject.OTM) 窗格內雙擊 ThisOutlookSession,即可開啟模組,並將以下程式碼複製貼上至空白模組中。
VBA 程式碼:在 Outlook 啟動時自動開啟多個 Outlook 視窗:
Private Sub Application_Startup()
Dim xCalendar As Folder
Dim xTasks As Folder
Dim xContacts As Folder
Dim xInbox As Folder
Dim xExplorer As Outlook.Explorer
Dim xWidth, xHeight As Integer
On Error Resume Next
xWidth = Int(GetSystemMetrics32(0) / 4) + 60
xHeight = GetSystemMetrics32(1)
Set xInbox = Outlook.Application.ActiveExplorer.CurrentFolder
xInbox.Display
Set Application.ActiveExplorer.CurrentFolder = xInbox
Set xExplorer = Application.ActiveExplorer
With xExplorer
.WindowState = olNormalWindow
.Top = 0
.Left = 0
.Height = xHeight
.Width = xWidth
End With
Set xCalendar = Outlook.Session.GetDefaultFolder(olFolderCalendar)
xCalendar.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
.WindowState = olNormalWindow
.Top = 0
.Left = xWidth
.Height = xHeight
.Width = xWidth
End With
Set xContacts = Outlook.Session.GetDefaultFolder(olFolderContacts)
xContacts.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
.WindowState = olNormalWindow
.Top = 0
.Left = xWidth * 2
.Height = xHeight
.Width = xWidth
End With
Set xTasks = Outlook.Session.GetDefaultFolder(olFolderTasks)
xTasks.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
.WindowState = olNormalWindow
.Top = 0
.Left = xWidth * 3
.Height = xHeight
.Width = xWidth
End With
End Sub

3. 接著點擊插入> 模組,並將下方程式碼複製貼上至開啟的空白模組中,詳情請參閱截圖:
Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long 
4. 儲存並關閉程式碼後,重新啟動 Outlook 以套用效果。現在,當您在開啟 Outlook 時,郵件、行事曆、聯絡人與工作視窗將自動並排顯示,請參閱截圖:
最佳 Office 生產力工具
體驗全新 Kutools for Outlook,內含 100+ 項超強功能!立即點擊下載!
🤖KUTOOLS AI:運用先進 AI 技術,輕鬆處理電子郵件——無論是回覆、摘要、優化、擴充、翻譯還是撰寫郵件,通通一鍵搞定!
📧 郵件自動化:自動答覆(支援 POP 與 IMAP)/預約寄送郵件/寄信時依規則自動抄送密送/自動轉發(高級規則)/自動加入問候語/自動將多收件人郵件拆分為個別訊息……
📨 郵件管理:撤回郵件/依主旨等條件封鎖詐騙郵件/刪除重複郵件/高級搜尋/整合文件夾……
📁 附件專業版:批次儲存/批次解除附加/批次壓縮/自動保存/自動拆離/自動壓縮……
🌟 介面魔法:😊更多精美酷炫表情符號/重要郵件來到時提醒您/最小化 Outlook 而非關閉……
👍 一鍵奇蹟:帶附件全部答復/防釣魚郵件/🕘顯示發送者當前時間時區……
👩🏼🤝👩🏻 聯絡人與行事曆:從選取的郵件中批次新增聯絡人/將聯繫人組拆分為個別群組/移除生日提醒……
用您的慣用語言暢享 Kutools — 完整支援英文、西班牙文、德文、法文、中文等 40 多種語言!
立即一鍵解鎖 Kutools for Outlook!別再等待,馬上下載,全面提升工作效率!


🚀 一鍵下載 — 立即取得所有 Office 增益集
強烈推薦:Kutools for Office(5 合 1)
一鍵下載五個安裝程式,一次完成 — Kutools for Excel、Outlook、Word、PowerPoint 與 Office Tab Pro!立即點擊下載!
- ✅ 一鍵便利:只需一次操作,即可下載全部五個安裝套件!
- 🚀 隨時應對任何 Office 任務:按需安裝所需增益集,立即提升工作效率!
- 🧰 包含:Kutools for Excel/Kutools for Outlook/Kutools for Word/Office Tab Pro/Kutools for PowerPoint