ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I Bring a window to the foreground? *outlook warning (https://www.excelbanter.com/excel-programming/319401-how-do-i-bring-window-foreground-%2Aoutlook-warning.html)

[email protected]

How do I Bring a window to the foreground? *outlook warning
 
Hello experts,

First of all.. " Stupind Windows security "

That being said...

I use the following bit of code.

Dim ol As Object, myItem As Object
Set ol = CreateObject("outlook.application")
Set myItem = ol.CreateItem(olMailItem)
myItem.To = Range("E2").Value
myItem.Subject = "A NEW PURCHASE ORDER HAS BEEN CREATED"
myItem.Body = "file:" & F & Chr(13) & Chr(13)
myItem.Body = myItem.Body & "This is an automated message"
myItem.Send

How do I make sure that the windows email security warning pops up in
the foreground and not behind the spreadsheet window?


Tom Ogilvy

How do I Bring a window to the foreground? *outlook warning
 
Ron deBruin has sample code showing how to use CDO, which avoids using
outlook and avoids the message.

http://www.rondebruin.nl

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Hello experts,

First of all.. " Stupind Windows security "

That being said...

I use the following bit of code.

Dim ol As Object, myItem As Object
Set ol = CreateObject("outlook.application")
Set myItem = ol.CreateItem(olMailItem)
myItem.To = Range("E2").Value
myItem.Subject = "A NEW PURCHASE ORDER HAS BEEN CREATED"
myItem.Body = "file:" & F & Chr(13) & Chr(13)
myItem.Body = myItem.Body & "This is an automated message"
myItem.Send

How do I make sure that the windows email security warning pops up in
the foreground and not behind the spreadsheet window?




gopher

How do I Bring a window to the foreground? *outlook warning
 
Thanks but I need to keep it this way.



All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com