By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,507 Members | 1,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,507 IT Pros & Developers. It's quick & easy.

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

P: 1
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_For wardEventHandler(_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!
Dec 5 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.