Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am running the following macro from Excel (2003) to send an e-mail from Outlook. When the e-mail has gone I want to be returned to Excel. This worked fine in Excel 97, but with Excel 2003, Outlook always remains on top at the end. What do I need to add to bring Excel backto the front? (The YesClickmacros work okay.) Paul Sub SendEmailFromExcel() Dim oOut1 As New Outlook.Application Dim oNS As Outlook.NameSpace Dim oMail As Outlook.MailItem Set oNS = oOut1.GetNamespace("MAPI") oNS.Logon Set oMail = oOut1.CreateItem(olMailItem) ResumeYesClickMacro With oMail ..Subject = "Changes to Client Details....." ..Recipients.Add " ..Send End With oNS.Logoff Set oNS = Nothing SuspendYesClickMacro End Sub -- PaulC ------------------------------------------------------------------------ PaulC's Profile: http://www.excelforum.com/member.php...fo&userid=7563 View this thread: http://www.excelforum.com/showthread...hreadid=501741 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I need to import my Excel Mailing list into mailing label format. | Excel Discussion (Misc queries) | |||
I need to import my Excel Mailing list into mailing label format. | Excel Discussion (Misc queries) | |||
GAL does not show up when e-mailing from Excel 2003 | Excel Discussion (Misc queries) | |||
Changing case on mailing lists I receive in Excel 2003? | Excel Worksheet Functions | |||
how do i convert MS Word mailing labels into an Excel mailing lis. | Excel Discussion (Misc queries) |