Как автоматически открывать несколько окон Outlook при запуске Outlook?
Когда вы запускаете учетную запись Outlook, окно почты открывается как обычно. Можно ли автоматически открывать другие окна Outlook, такие как окна почты, календаря, контактов и задач, одновременно с запуском Outlook?
Автоматическое открытие нескольких окон Outlook при запуске Outlook с кодом VBA
Автоматическое открытие нескольких окон Outlook при запуске Outlook с кодом VBA
Здесь я могу представить код VBA, который поможет вам открывать несколько окон Outlook, таких как окна почты, календаря, контактов и задач, сразу при запуске Outlook. Пожалуйста, сделайте так:
1. Удерживая нажатой ALT + F11 , чтобы открыть Microsoft Visual Basic для приложений окно.
2. В Microsoft Visual Basic для приложений окно, дважды щелкните ThisOutlookSession из Проект1 (VbaProject.OTM) панель, чтобы открыть модуль, а затем скопируйте и вставьте следующий код в пустой модуль.
Код 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. Then go on clicking Insert > Module, copy and paste below code into the opened blank module, see screenshot:
Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long

4. Then save and close the codes, restart the Outlook to take the codes effect. Now, when opening Outlook, the Mail, Calendar, Contacts and Tasks windows will be opened automatically side by side, see screenshot:

Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!
- Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
- BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
- Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
- Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
- Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.

Sort comments by
#25744
This comment was minimized by the moderator on the site
0
0
#25745
This comment was minimized by the moderator on the site
Report
0
0
#31189
This comment was minimized by the moderator on the site
Report
0
0
#31190
This comment was minimized by the moderator on the site
Report
0
0
#31191
This comment was minimized by the moderator on the site
Report
0
0
#31192
This comment was minimized by the moderator on the site
Report
0
0
There are no comments posted here yet