I have a user-configurable VB5 application to personalize the way Outlook 97 launches, by selecting Outlook folders to open. In my case it launches three instances of Outlook 97, with the focus on Calendar, Inbox, and our Public contacts, respectively, in three separate Outlook windows.
However, Outlook has no built-in method to maximize itself, so the three windows appear in Restored size, which is not what I want. Neither has the Outlook window a hWnd property that might be passed to an API call. SendKeys is possible but unelegant.
Does anyone know of a reliable method from within VB to maximize an Outlook window? Existing code looks somewhat like this:
Set ol = New Outlook.Application
Set ns = ol.GetNamespace("MAPI")
' Code to retrieve desired folder from application settings
' This is stored in an sFolderPath string variable
Set f = ns.Folders(sFolderPath)
' Maximize code should go here