Problem with Attachment.remove: different behavior when debugging? 
Author Message
 Problem with Attachment.remove: different behavior when debugging?

Hi everyone,

I am (still) trying to zip attachments after the user clicks the send
button of a message. The problem is with removing the original files
and then adding the zipped archive: when I am running the code,
everything works fine as long as the message has not been saved in the
message-store yet. But if it has been saved (e. g. in the draft folder
or anywhere else), Outlook will not remove the attachments but only add
the archive. (No point sending an email with all attachments twice, is
there.) Btw. I am using the mail.save statement after every remove/add
as the Outlook-reference recommends.

I first thought the obvious: my code is broken. But it's not: when I
step through the code in the VB de{*filter*} everything works fine. I
_never_ have double-attachments then. Honestly.

So my question is: can distribute the VB-de{*filter*} to the users?
Just kidding.
Has anyone seen this behavior? Am I doing something wrong? (I'm not.)

Thanks in advance!

Stefan Ukena
--

Remeber to replace firstname.lastname with my firstname and lastname :-)



Thu, 19 May 2005 14:13:27 GMT  
 Problem with Attachment.remove: different behavior when debugging?
What code are you using the remove the attachments? The Remove method is broken in versions before Outlook 2002.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.*-*-*.com/
Author of
     Microsoft Outlook Programming: Jumpstart
     for Administrators, Power Users, and Developers
      http://www.*-*-*.com/
Quote:

> Hi everyone,

> I am (still) trying to zip attachments after the user clicks the send
> button of a message. The problem is with removing the original files
> and then adding the zipped archive: when I am running the code,
> everything works fine as long as the message has not been saved in the
> message-store yet. But if it has been saved (e. g. in the draft folder
> or anywhere else), Outlook will not remove the attachments but only add
> the archive. (No point sending an email with all attachments twice, is
> there.) Btw. I am using the mail.save statement after every remove/add
> as the Outlook-reference recommends.

> I first thought the obvious: my code is broken. But it's not: when I
> step through the code in the VB de{*filter*} everything works fine. I
> _never_ have double-attachments then. Honestly.



Fri, 20 May 2005 21:20:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Different behavior between normal and debug mode!

2. Attachments.remove is not removing attachment

3. VB - Different behavior on different machines

4. Removing attachments problem

5. How to debug binary behavior in IE

6. Different behaviors if MDB or MDE

7. Mailmerge - different behavior on Win95 & NT

8. Different behavior when using form from Outlook or (through VB) Access

9. Applescript with MacScript, different behavior between OS9 and OSX

10. behavior of Getlocale() on different versions of OS

11. Different behavior of mscomm32.ocx in VB5

12. Grid32.ocx, column behavior different between versions

 

 
Powered by phpBB® Forum Software