ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   make outlook visible (https://www.excelbanter.com/excel-programming/320120-make-outlook-visible.html)

gopher

make outlook visible
 
After using a bit of code that send an email to outlook I get the email
warning message. Sometimes that message remains in the backround.

How do I bring the allready open outlook program to the foreground on
my desktop in VBA code?


Bob Phillips[_6_]

make outlook visible
 
olApp.Visible = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"gopher" wrote in message
ups.com...
After using a bit of code that send an email to outlook I get the email
warning message. Sometimes that message remains in the backround.

How do I bring the allready open outlook program to the foreground on
my desktop in VBA code?




gopher

make outlook visible
 
it's still not working,...

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 message was automatically
sent By Master PO 3.0"
myItem.Display
olApp.Visible = True ' i get an error here.


Phil

make outlook visible
 
Wrong newsgroup: see microsoft.public.outlook



"gopher" a écrit dans le message de news:
...
After using a bit of code that send an email to outlook I get the email
warning message. Sometimes that message remains in the backround.

How do I bring the allready open outlook program to the foreground on
my desktop in VBA code?




Bob Phillips[_6_]

make outlook visible
 
That is because you called it ol, so you would use

ol.Visible = True

--

HTH

RP
(remove nothere from the email address if mailing direct)


"gopher" wrote in message
oups.com...
it's still not working,...

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 message was automatically
sent By Master PO 3.0"
myItem.Display
olApp.Visible = True ' i get an error here.




Bob Phillips[_6_]

make outlook visible
 
Right newsgroup, he is doing it from Excel via automation.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Phil" wrote in message
...
Wrong newsgroup: see microsoft.public.outlook



"gopher" a écrit dans le message de news:
...
After using a bit of code that send an email to outlook I get the email
warning message. Sometimes that message remains in the backround.

How do I bring the allready open outlook program to the foreground on
my desktop in VBA code?







All times are GMT +1. The time now is 09:12 PM.

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