View Single Post
  #6  
Old June 16th 09, 07:04 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default OL2003 & VB6:- "Could not send the message"

Umm, don't open the attachment?

Or handle the AttachmentRead() event on that item. That will tell you the
attachment was opened, use that to get the hWnd of the attachment window
using a Win32 API call such as FindWindow(), then send or post a WM_CLOSE
message to that window when you want to close the attachment window.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Womble" wrote in message
...
Ken,

Thanks for that, the DoEvents didn't work. But the GetItemFromID()
approach
did.

Unfortnatly, that moved me onto another hurdle.

The reason I'm copying is that I'm modifying the reply method, and wanted
to
ensure that the original item was not affected. And this works fine as I
expected - except when I have an open attachment. The Currmail.Copy code
gives me a "An attachment to this message may be currently open in another
program......" message.

If I click YES to continue, the codes works fine. If NO, then NewMail is
empty and the code falls over with Object Expected.

Any thoughts, as to how I can work around this.


Ads