A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sending mail from NewMailEx deletes the mail from the Inbox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 10th 07, 05:57 PM posted to microsoft.public.outlook.program_vba
Ron
external usenet poster
 
Posts: 128
Default Sending mail from NewMailEx deletes the mail from the Inbox

Here's the function:

Public WithEvents outApp As Outlook.Application

Sub Intialize_Handler()
Set outApp = Application
End Sub


Private Sub outApp_NewMailEx(ByVal EntryIDCollection As String)
Dim arr() As String
Dim i As Integer
Dim m As MailItem
On Error Resume Next
arr = Split(EntryIDCollection, ",")
For i = 0 To UBound(arr)
Set m = Application.Session.GetItemFromID(arr(i))
m.To = "
m.Send
Next
End Sub

This works OK; problem is that the mailitems disappearfrom the Index (they
are not even in the deleted folder). How can I keep them in the Inbox?

Thanks.
RON

  #2  
Old January 10th 07, 07:40 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Sending mail from NewMailEx deletes the mail from the Inbox

Please do not start up multiple threads related to the same thing. It makes
it impossible to follow and one doesn't know what's the latest or what post
supersedes another. Please place everything in one thread that's related so
we can follow what's going on and see what might be solutions for your
problems.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"RON" wrote in message
...
Here's the function:

Public WithEvents outApp As Outlook.Application

Sub Intialize_Handler()
Set outApp = Application
End Sub


Private Sub outApp_NewMailEx(ByVal EntryIDCollection As String)
Dim arr() As String
Dim i As Integer
Dim m As MailItem
On Error Resume Next
arr = Split(EntryIDCollection, ",")
For i = 0 To UBound(arr)
Set m = Application.Session.GetItemFromID(arr(i))
m.To = "
m.Send
Next
End Sub

This works OK; problem is that the mailitems disappearfrom the Index (they
are not even in the deleted folder). How can I keep them in the Inbox?

Thanks.
RON


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inbox says 1 mail message, but nothing there ? pogolady Outlook Express 3 November 12th 06 05:52 PM
outlook deletes my contact e-mail address Kandis Brinkman. Ohio Outlook - Using Contacts 1 September 9th 06 06:05 PM
Suddenly, my server is not sending mail to my inbox....solution? Meg Outlook Express 10 July 9th 06 09:14 PM
Mail Disappeared from My InBox Rena B Outlook Express 1 May 23rd 06 02:34 AM
Soft Deletes, Hard Deletes, Shift+Delete, Move, etc. Marty List Outlook and VBA 3 March 23rd 06 05:19 PM


All times are GMT +1. The time now is 08:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.