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

Tags: , , , ,

Sending mail from NewMailEx deletes the mail from the Inbox





 
 
Thread Tools Display Modes
  #1  
Old January 10th 07, 06:57 PM posted to microsoft.public.outlook.program_vba
Ron
external usenet poster
 
Posts: 103
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

Ads
  #2  
Old January 10th 07, 08:40 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 3,778
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
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 06:52 PM
outlook deletes my contact e-mail address Kandis Brinkman. Ohio Outlook - Using Contacts 1 September 9th 06 07:05 PM
Suddenly, my server is not sending mail to my inbox....solution? Meg Outlook Express 10 July 9th 06 10:14 PM
Mail Disappeared from My InBox Rena B Outlook Express 1 May 23rd 06 03:34 AM
Soft Deletes, Hard Deletes, Shift+Delete, Move, etc. Marty List Outlook and VBA 3 March 23rd 06 06:19 PM


All times are GMT +1. The time now is 04:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Loans - Online Advertising - Shares - Send Money Online - American Express Credit Cards