login about faq

I have a problem with SaveAllAttachments same name issue. if there are two attacthments in one mail with the same name it copying to dir folder just one attachment. But when i look the imap.GetMailNumAttach(email) methods value its shows 2 attachments.

Does anyone have an idea?

asked Mar 17 '15 at 08:15

ismailkoken's gravatar image


Have you tried setting the OverwriteExisting property to 0? See this excerpt from the documentation:

OverwriteExisting As Long

When 1 (the default) the methods to save email attachments and related items will overwrite files if they already exist. If 0, then the methods that save email attachments and related items will append a string of 4 characters to create a unique filename if a file already exists. The filename of the attachment (or related item) within the email object is updated and can be retrieved by the program to determine the actual file(s) created.


answered Mar 17 '15 at 09:04

jpbro's gravatar image

jpbro ♦

Thanks! That's a good answer. :)

(Mar 17 '15 at 10:10) chilkat ♦♦

Hi jpbro I have tried your suggestion and it has solved my problem. Thanks a lot :)


answered Mar 17 '15 at 10:12

ismailkoken's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Mar 17 '15 at 08:15

Seen: 1,956 times

Last updated: Mar 17 '15 at 10:12

powered by OSQA