Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimize Outlook using Access VBA 2

Status
Not open for further replies.

grgimpy

Programmer
Nov 1, 2006
124
US
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?

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
 
what about this ?
Olook.ActiveExplorer.WindowState = 1 'olMinimized

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Once again, thank you very much. This works perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top