Reading mailitem after mail is send give runtime error.

  • Thread starter Thread starter SklHTkVTSA
  • Start date Start date
Status
Not open for further replies.
S

SklHTkVTSA

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
 
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.

"JIGNESH" <JIGNESH> 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
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
U Outbox Message Stuck after reading some MailItem Properties with VBA Outlook VBA and Custom Forms 1
Z Automatically adjust Outlook Reading Pane from bottom to right depending on portrait or landscape window Using Outlook 1
H Preventing the 'email address fetch from Exchange' crashing email reading code Exchange Server Administration 0
J Split reading view with history Using Outlook 2
D Outlook launch email showing new unread email in reading pane Using Outlook 11
W Outlook 2010 Reading Pane Slows Startup Using Outlook 3
C Custom Form (seperate layout pages and message reading pane) Outlook VBA and Custom Forms 0
C Reading Pane for Custom Form Outlook VBA and Custom Forms 2
llama_thumper Composingemails in reading pane Using Outlook 1
O Reading Pane safety Using Outlook 0
P Reading Pane (Reading Pain?) Default Setting Using Outlook 1
M Outlook 2016 bottom reading pane has disappeared Using Outlook 2
M Outlook 2016: Changing default font for Notes and Reading Pane Using Outlook 4
Rupert Dragwater "there was an error reading this theme" Using Outlook 3
R Toggle the Reading Pane using Keyboard Shortcut Using Outlook 0
T Format Reading Pane Outlook VBA and Custom Forms 5
B Auto Preview Attachment in Inspector Reading Pane Outlook VBA and Custom Forms 1
D Calendar view problems with reading pane open Using Outlook 0
E Reading Pane has disappeared Using Outlook 1
R Outlook 2010 - Reading Pane and To Do Bar Settings Not Saved on Exit Using Outlook 2
Diane Poremsky Excel Files Won't Display in Reading Pane Using Outlook 1
S How can I Customize Message Header in both Reading Pane and Open Message Design? Using Outlook 1
M Outlook 2007: how to narrow the reading pane and the composing pane Using Outlook 0
P Custom Forms in Reading/Viewing Pane Using Outlook 1
L Reading Pane - COMPLETELY DISABLE? Using Outlook 10
T Outgoing Messages in the Reading Pane Cannot Be Flagged in Outlook 2013 Using Outlook 6
F Outlook 2007 - Reading Pane Automatically Downloads First/Topmost Message Using Outlook 4
B Outlook 2010 won't save 'current view' with reading pane at 'bottom' Using Outlook 4
F Outlook 2010, reading pane, global settting for fields? Using Outlook 1
V Reading/Posting in Newsgroups Using Outlook 1
C Contact photos not showing in reading pane in Outlook 2013 Using Outlook 3
T Killing reading pane - "globally" Using Outlook 11
L Show all images for jpg attachments in reading pane for received emails? Using Outlook 3
A Received Date None after reading Using Outlook 2
M Viewing Custom Form Fields in the Reading Pane and in Replies Using Outlook 3
B Reading CompressedRichText field in SQL database BCM (Business Contact Manager) 1
R Proof Of Looping Bug in Reading Outlook Inbox From Access? Outlook VBA and Custom Forms 2
L Reading another mailbox Address Outlook VBA and Custom Forms 2
S Macro for Viewing mails one after the other in the Reading Pane Outlook VBA and Custom Forms 2
E CustomTaskPane in PLace of Reading Pane Outlook VBA and Custom Forms 3
E CustomTaskPane in PLace of Reading Pane Outlook VBA and Custom Forms 3
N Reading Recipients in a folder Outlook VBA and Custom Forms 1
J Reading outlook conatcts Outlook VBA and Custom Forms 1
D Getting Started - Reading attachment Outlook VBA and Custom Forms 4
J Reading E-Mails in VBA Outlook VBA and Custom Forms 1
T Blank Email in Reading Pane for Custom Form Outlook VBA and Custom Forms 12
C Getting reading pane horizontal instead of vertical Using Outlook 2
Y View Reading Pane for Drafts folder Using Outlook 2
Rob Can't save MailItem because the message changed in .pst file Outlook VBA and Custom Forms 0
P MailItem.To Property with VBA not work Outlook VBA and Custom Forms 2

Similar threads

Back
Top