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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Losing handle to MailItem when send



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 1st 06, 05:54 PM posted to microsoft.public.outlook.program_addins
donald
external usenet poster
 
Posts: 25
Default Losing handle to MailItem when send

i am chnaging that in the Sent Items

i have currentoutbox = _NameSpace.Folders.Item("MailBox -
XXXXXXXXXX").Folders("Sent Items").Items

  #2  
Old February 1st 06, 05:58 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Losing handle to MailItem when send

But you're using the Add event on the OUtbox's Items collection:

Private Sub currentoutbox_ItemAdd(ByVal Item As Object) Handles
currentoutbox.ItemAdd


Never use that folder's ItemAdd event. Use the ItemAdd event in Sent Items or use Application_ItemSend.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"donald" wrote in message ups.com...
i am chnaging that in the Sent Items

i have currentoutbox = _NameSpace.Folders.Item("MailBox -
XXXXXXXXXX").Folders("Sent Items").Items

  #3  
Old February 1st 06, 06:03 PM posted to microsoft.public.outlook.program_addins
donald
external usenet poster
 
Posts: 25
Default Losing handle to MailItem when send

i am loss here

what folder do i do ItemAdd event on and what type do i have it on??

Donald

  #4  
Old February 1st 06, 06:17 PM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Losing handle to MailItem when send

This statement in the snippet you posted suggests that you're trying to process items as they are added to the Outbox, although you don't show the derivation of your "currentoutbox" object:

Private Sub currentoutbox_ItemAdd(ByVal Item As Object) _
Handles currentoutbox.ItemAdd

Repeating: Never use the Outbox folder's ItemAdd event. Use the ItemAdd event for the Sent Items folder or use Application_ItemSend.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"donald" wrote in message ups.com...
i am loss here

what folder do i do ItemAdd event on and what type do i have it on??

Donald

 




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
How do I set up Outlook for email without losing contacts Lorraine Outlook - General Queries 3 March 1st 06 03:37 PM
How can I create a MailItem that displays like a received MailItem ? Clive Outlook - Using Forms 0 February 27th 06 05:14 PM
Will Outlook Handle These Needs? Janet Outlook - Calandaring 0 February 17th 06 11:43 PM
How can I Print out my contacts without losing longer note entrys BBusyBookworm Outlook - Using Contacts 1 February 15th 06 04:10 PM
dialog comes up when trying to access mailItem Neo Add-ins for Outlook 3 January 16th 06 10:56 PM


All times are GMT +1. The time now is 01:02 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.