N
Nigel
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 = (e-mail address removed)
.Subject = "Test"
.Body = "Test"
'.Attachments.Add
.DeleteAfterSubmit
On Error Resume Next
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
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 = (e-mail address removed)
.Subject = "Test"
.Body = "Test"
'.Attachments.Add
.DeleteAfterSubmit
On Error Resume Next
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub