LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Email - Outlook no Closing Session

Hi All
I am using thse following to mail some information from Excel, whether
Outlook is currently running or not, I end up wth an instance of Outlook
that does not close. Everytime I call this it create another instance.
Why?

TIA
Cheers
Nigel

Private Sub EMail()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To =
.Subject = "Test"
.Body = "Test"
'.Attachments.Add
.DeleteAfterSubmit
On Error Resume Next
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up Outlook email? new at outlook set up New Users to Excel 2 March 5th 09 08:31 AM
message box to print or email when closing workbook tom n.[_2_] Excel Discussion (Misc queries) 0 October 7th 08 05:58 PM
Outlook Email Jame-O New Users to Excel 1 November 7th 06 05:53 PM
Startup and template locations in Citrix TS session and local session John Nurick Setting up and Configuration of Excel 2 September 21st 06 10:42 PM
Email & Outlook Chris Excel Discussion (Misc queries) 0 March 14th 06 12:04 PM


All times are GMT +1. The time now is 05:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"