When forwarding an email with an open attachment the user warned t

S

Sanadeep Yadav

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!
 
J

JP

This is a VBA newsgroup. You might want to try posting this in
microsoft.public.developer.outlook.addins since it's geared more
towards add-in development (which I assume is what you're doing).

--JP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top