KutoolsforOffice — 一套方案,五大工具。事半功倍。

如何在 Outlook 啟動時自動開啟多個 Outlook 視窗?

作者Xiaoyang修改日期

當您在啟動 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
doc open multiple windows startup 1

3. 接著點擊插入 模組,並將下方程式碼複製貼上至開啟的空白模組中,詳情請參閱截圖:

Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long
doc open multiple windows startup 2

4. 儲存並關閉程式碼後,重新啟動 Outlook 以套用效果。現在,當您在開啟 Outlook 時,郵件、行事曆、聯絡人與工作視窗將自動並排顯示,請參閱截圖:

doc open multiple windows startup 3

最佳 Office 生產力工具

體驗全新 Kutools for Outlook,內含 100+ 項超強功能!立即點擊下載!

🤖KUTOOLS AI運用先進 AI 技術,輕鬆處理電子郵件——無論是回覆、摘要、優化、擴充、翻譯還是撰寫郵件,通通一鍵搞定!

📧 郵件自動化自動答覆(支援 POP 與 IMAP)預約寄送郵件寄信時依規則自動抄送密送自動轉發(高級規則)自動加入問候語自動將多收件人郵件拆分為個別訊息……

📨 郵件管理撤回郵件依主旨等條件封鎖詐騙郵件刪除重複郵件高級搜尋整合文件夾……

📁 附件專業版批次儲存批次解除附加批次壓縮自動保存自動拆離自動壓縮……

🌟 介面魔法😊更多精美酷炫表情符號重要郵件來到時提醒您最小化 Outlook 而非關閉……

👍 一鍵奇蹟帶附件全部答復防釣魚郵件🕘顯示發送者當前時間時區……

👩🏼‍🤝‍👩🏻 聯絡人與行事曆從選取的郵件中批次新增聯絡人將聯繫人組拆分為個別群組移除生日提醒……

用您的慣用語言暢享 Kutools — 完整支援英文、西班牙文、德文、法文、中文等 40 多種語言!

立即一鍵解鎖 Kutools for Outlook!別再等待,馬上下載,全面提升工作效率!

kutools for outlook features1kutools for outlook features2

🚀 一鍵下載 — 立即取得所有 Office 增益集

強烈推薦:Kutools for Office(5 合 1)

一鍵下載五個安裝程式,一次完成 — Kutools for Excel、Outlook、Word、PowerPointOffice Tab Pro立即點擊下載!

  • 一鍵便利:只需一次操作,即可下載全部五個安裝套件!
  • 🚀 隨時應對任何 Office 任務:按需安裝所需增益集,立即提升工作效率!
  • 🧰 包含:Kutools for Excel/Kutools for Outlook/Kutools for Word/Office Tab Pro/Kutools for PowerPoint