![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am running a VBA program in Access to send emails. The email is sent OK
but Outlook stays in memory. In the code below I have put in a message box to slow the code down. If this is there then Outlook correctly closes itself down. Because it is not closed it creates problems the next time I call the code, even if it is modified to pick up an already open version of outlook. I am using Office 2002 on a Vista machine with several cpus Any suggestions please many thanks -------------------------------- Public Sub Create_eMails() Dim olApp As New Outlook.Application Dim olNs As Outlook.NameSpace Dim OBmailItem As Outlook.MailItem Set olApp = New Outlook.Application Set olNs = olApp.GetNamespace("MAPI") olNs.Logon "" Set OBmailItem = olApp.CreateItem(olMailItem) OBmailItem.To = " OBmailItem.Subject = "Test Email. " OBmailItem.Body = "Test Body Text " OBmailItem.Send Call MsgBox("Wait") olNs.Logoff olApp.Quit Set OBmailItem = Nothing Set olNs = Nothing Set olApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Other Calendars not staying | Noel | Outlook - Calandaring | 3 | June 23rd 08 05:06 PM |
Sent messages staying in outbox... | Mike | Outlook - General Queries | 1 | June 29th 07 06:18 PM |
2 GB of memory over 1 GB of memory free, and outlook complains of being out of memory | David Hettel | Outlook Express | 7 | October 18th 06 12:08 PM |
messages staying in ouitbox | Idot | Outlook - General Queries | 2 | August 29th 06 08:50 PM |
Outlook Not Closing - Staying in System Tray | Alan W | Outlook - Installation | 1 | August 8th 06 08:13 PM |