Hallo an alle Makro-Experten,
einige meiner Kollegen nutzen ein Makro, um MS Outlook beim Start dreifach zu öffnen (wieso, warum und ob es sinnvoll ist, kann ich an dieser Stelle nicht beantworten - ich habe einfach nicht nachgefragt!).
Das Makro ist für ein 32-Bit Version ausgelegt, benötigt wird aber eine für 64-Bit Systeme.
Ich habe mich schon mehrfach an Makros versucht und bin gescheitert. Gibt es hier vielleicht jemanden, der das ohne großen Aufwand anpassen kann?
Vorab schon mal ganz lieben Dank!
---------------------------------------------------------------------------------------------------------------------------------------
In "ThisOutlookSession" einfügen:
Private Declare PtrSafe Function GetSystemMetrics32 Lib "User32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long
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 As Integer, xHeight As Integer
On Error Resume Next
xWidth = GetSystemMetrics32(0)
xHeight = GetSystemMetrics32(1)
Set xInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
Set Outlook.Application.ActiveExplorer.CurrentFolder = xInbox
Set xExplorer = Application.ActiveExplorer
ExplorerDisplay xExplorer, 0
Set xCalendar = Outlook.Session.GetDefaultFolder(olFolderCalendar)
xCalendar.Display
Set xExplorer = Application.ActiveExplorer
ExplorerDisplay xExplorer, xWidth
Set xTasks = Outlook.Session.GetDefaultFolder(olFolderTasks)
xTasks.Display
Set xExplorer = Application.ActiveExplorer
ExplorerDisplay xExplorer, (xExplorer.Width + 1) * -1
End Sub
Sub ExplorerDisplay(Exp As Explorer, ByVal L As Integer)
With Exp
.WindowState = olNormalWindow
.Top = 0
.Left = L
.WindowState = olMaximized
End With
End Sub
In "Modul1" bzw. entsprechend benanntes neues Modul einfügen:
Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long
---------------------------------------------------------------------------------------------------------------------------------------
|