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?
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?
olApp.Visible = True
--
HTH
RP
(remove nothere from the email address if mailing direct)
"gopher" <[email protected]> wrote in message
news:[email protected]...
> 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?
>
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.
Wrong newsgroup: see microsoft.public.outlook
"gopher" <[email protected]> a écrit dans le message de news:
[email protected]...
> 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?
>
Right newsgroup, he is doing it from Excel via automation.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Phil" <[email protected]> wrote in message
news:[email protected]...
> Wrong newsgroup: see microsoft.public.outlook
>
>
>
> "gopher" <[email protected]> a écrit dans le message de news:
> [email protected]...
> > 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?
> >
>
>
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" <[email protected]> wrote in message
news:[email protected]...
> 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.
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks