WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Reading mailitem after mail is send give runtime error.

 
   Home -> Office -> Program Add-Ins RSS
Next:  How to schedule Out of Office, i.e. from and to d..  
Author Message
JIGNESH

External


Since: May 07, 2009
Posts: 1



(Msg. 1) Posted: Thu May 07, 2009 4:43 am
Post subject: Reading mailitem after mail is send give runtime error.
Archived from groups: microsoft>public>outlook>program_addins (more info?)

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
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 2) Posted: Thu May 07, 2009 9:38 am
Post subject: Re: Reading mailitem after mail is send give runtime error. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <JIGNESH DeleteThis @discussions.microsoft.com> wrote in message
news:ADE78E7E-2A40-44BD-9419-48D0FB367904@microsoft.com...
> 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
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support