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

Reading mailitem after mail is send give runtime error.



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 7th 09, 12:43 PM posted to microsoft.public.outlook.program_addins
JIGNESH
external usenet poster
 
Posts: 5
Default Reading mailitem after mail is send give runtime error.

Hi,

I have inspectorClose event, i am reading entryID, Subject etc in this event.
It works well when any existing mail is opened and closed.

but if a new email is composed then
1. In Application_ItemSend event there is no EntryId generated, which means
mail it not yet send.

2. In inspectorClose event when i attempt to read EntryID, i get an error
message
that "item is moved.....".

What is the correct way to handle this.

Regards
Jignesh

Ads
  #2  
Old May 7th 09, 02:38 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Reading mailitem after mail is send give runtime error.

No item has an EntryID until it's saved. If it's sent without saving the
EntryID is set after sending when the item is moved to wherever, usually
Sent Items.

For Exchange mailboxes when an item is moved the EntryID is changed. That
doesn't happen with PST files, the behavior depends on the store provider.
So even if the item was saved before sending you can't necessarily rely on
it having the same EntryID after it's sent and moved to Sent Items.

If you want the EntryID before or during sending handle the item.Save()
event and if the item is not yet saved then save it during the Send() event.

If you want the new EntryID after the item is moved to Sent Items, handle
the ItemAdd() event of the Sent Items folder's Items collection.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"JIGNESH" wrote in message
...
Hi,

I have inspectorClose event, i am reading entryID, Subject etc in this
event.
It works well when any existing mail is opened and closed.

but if a new email is composed then
1. In Application_ItemSend event there is no EntryId generated, which
means
mail it not yet send.

2. In inspectorClose event when i attempt to read EntryID, i get an error
message
that "item is moved.....".

What is the correct way to handle this.

Regards
Jignesh


 




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
Reading (Displaying) MailItem with Custom Form Paulem0071 Add-ins for Outlook 3 December 2nd 08 02:25 PM
Reading MailItem properties outside of Outlook Ken Warthen Outlook and VBA 7 September 2nd 08 10:40 PM
What is error# 0x80040102, my Domino connector is not reading mail Ali Khan Outlook - General Queries 0 November 25th 06 01:24 PM
IE 6.0 Runtime Error Platebanger Outlook Express 2 April 14th 06 12:50 PM
Runtime error KENNETH M LONG Outlook Express 3 January 19th 06 11:18 PM


All times are GMT +1. The time now is 06:09 AM.


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.