I don't really see a solution since you are changing items without saving
them. That will force the prompts. We've gone over various other problems
caused by this structure, about all I can think of other than not adding the
attachments or saving the items is to disable those buttons so they can't be
used.
--
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
"Ashish" <(E-Mail Removed)> wrote in message
news:emzFS%(E-Mail Removed)...
> 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.
>