Using mailObj.save while attachment is opened

  • Thread starter Thread starter PuppetMaster
  • Start date Start date
P

PuppetMaster

I currently have a COM addin written in VB6 for Outlook 2002. I am
using the mailObj.save function which works fine, but if the mail
contains an attachment that the user has open at the same time, Outlook
displays a message: "An attachment to this message may be currently
open in another program. If you continue, you may lose any changes you
have made to the attachment using the other program. Do you want to
continue?"

Is there any way to programatically detects for this situation, before
Outlook shows the above message?

TIA
 
The only way I know of to detect that would be to iterate all windows that
are open in Windows using the Win32 API functions and see if any have
captions that match the attachment name.
 
Back
Top