I am using the following code to open Outlook when a form is opened in Access. It works fine, but I'd like to minimize the window so the user doesn't have it in the way. I want Outlook to be open while the user is entering data into each form so that e-mails are sent on a consistent basis.
How do I minimize Outlook from Access using VBA?
How do I minimize Outlook from Access using VBA?
Code:
Private Sub OpenOutlook()
On Error GoTo Err_Handler
Dim Olook As Outlook.Application
Set Olook = CreateObject("Outlook.Application")
Dim ns As Outlook.NameSpace
Dim Folder As Outlook.MAPIFolder
Set ns = Olook.GetNamespace("MAPI")
Set Folder = ns.GetDefaultFolder(olFolderOutbox)
Folder.Display
Exit_Handler:
Exit Sub
Err_Handler:
Resume Exit_Handler
End Sub