When forwarding an email with an open attachment the user warned twice that an attach

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeep98811
    New Member
    • Dec 2009
    • 1

    When forwarding an email with an open attachment the user warned twice that an attach

    I am getting following weird issue, "When forwarding an email with an open attachment the user warned twice that an attachment is open".

    I am catching Forward event of mail item in function _mail_Forward() .

    Steps to reproduce issue:
    1. Open email , open attachment
    2. Click on Forward Button,
    3. Outlook displays message "The attachment "test" is open or in use by another application. If you continue, you will lose any changes you made to the attachement that is using the opther application."
    4. Once i press Yes option i get another same warning message as above.

    5. When i debug the code, i found that 1st warning Message comes the moment i click on Forward button and 2nd warning comes when i save mail in Forward event handler _mail_Forward() .

    Can you please explain how can i suppress the 1st warning message given by outlook?

    Following is the snippet of code :[Outlook2007 / VS2008]
    Following is the code to register function _mail_Forward() for click event of Forward button.

    ((Outlook.ItemE vents_10_Event) _mail).Forward += new Microsoft.Offic e.Interop.Outlo ok.ItemEvents_1 0_ForwardEventH andler(_mail_Fo rward);

    void _mail_Forward(o bject Forward, ref bool Cancel)
    {
    if (!_mail.Saved)
    { _mail.Save();
    }

    bDeletePressed = true;
    Globals.ThisAdd In._checkfwdrep ly = true;
    }

    Any help would be highly appreciable!!
    Thanks!
Working...