-
Minimize Outlook window from Excel
I am using Outlook to send an Excel attachment using VBA. The VBA code is in the Excel sheet. The email is sent using SendKeys to click the send button in Outlook. How can I minimize the Outlook window while waiting for sendkeys.
I dont want the user to actually see an Outlook window. Here's the end of my code that takes care of sendkeys etc..etc..
[VBA]
.Subject = " Sent " & " " & " " & Format(Now, "mm-dd-yyyy hh-mm ")
.Body = "No Display attempt Info..."
.Attachments.Add TotalsWb.FullName
OL.Visible = True
.Display
.WindowState = olMinimized
End With
Set mpMail = Nothing
Application.Wait Now() + TimeSerial(0, 0, 7)
SendKeys "%{s}", True
End Function
[/VBA]
I have tried .WindowState = olMinimized
and a few other formats like Application.WindowState = wdWindowStateMinimize
Any help, ideas ? Suggestions
Thanks
-
-
Hi:
I only want to Minimize Outlook when I am sending this specific email from excel. What they're doing is starting Outlook in Minimizzed mode. That'll be a no go for me.
Thanks for the link anyway. I may use some of that info later.
Any other ideas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules