View Single Post
  #7  
Old November 2nd 09, 01:19 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default how to capture events for next item

How outlook calls its event when i open a mail and close it

open a mail, outlook call onnewinspector. In this i get
inspector.currentitem and registered events for current item.
Then outlook call item_open event, i add a attachment in current item but do
not call item-Save. Now when mail display it shows an attachment. After
this when i close this mail outlook call item_close. Here i delete that
attachment and call save function. After this outlook call inspector_close.

Now for the case when i click on next/previous item

open a mail, outlook call onnewinspector. In this i get
inspector.currentitem and registered events for current item.
Then outlook call item_open event, i add a attachment in current item but do
not call item-Save. Now when mail display it shows an attachment. When i
click on next button outlook call inspector_close (here it did not call
item_close). Then it call onnewinspector for next mail. After that outlook
call item_close for previous mail. And outlook does not call item_open for
next mail.

I have 2 problems here.
1. For next mail since i do not get item_open event so can not add a
attachment in next mail.
2. Since for this case outlook calls inspector_close event (did not call
item_close event and i add a attachment in mail, means i modify the mail )
so outlook prompts a message "Do you want to save".
Since item_close is not called, In inspector_close i delete attachment from
mail and save it but still outlook displays the message "Do you want to
save".

Thats why i ask how to register events for next/previous button. But since
it's not possible so is there any solution for that problem.


Ads