- Joined
- Dec 5, 2009
- Messages
- 1
- Reaction score
- 0
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.ItemEvents_10_Event)_mail).Forward += new Microsoft.Office.Interop.Outlook.ItemEvents_10_ForwardEventHandler(_mail_Forward);
void _mail_Forward(object Forward, ref bool Cancel)
{
if (!_mail.Saved)
{ _mail.Save();
}
bDeletePressed = true;
Globals.ThisAddIn._checkfwdreply = true;
}
Any help would be highly appreciable!!
Thanks!
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.ItemEvents_10_Event)_mail).Forward += new Microsoft.Office.Interop.Outlook.ItemEvents_10_ForwardEventHandler(_mail_Forward);
void _mail_Forward(object Forward, ref bool Cancel)
{
if (!_mail.Saved)
{ _mail.Save();
}
bDeletePressed = true;
Globals.ThisAddIn._checkfwdreply = true;
}
Any help would be highly appreciable!!
Thanks!