Type | Description | |||
FileName as Variant | A string expression that defines the name of the file to create and save the attachment's data. If no FileName parameter is provided, the Save saves the data using the attachment's name under the current directory. |
The following sample saves all attachments) into the c:\temp folder:
With ibx Dim iMessage As Long For iMessage = 0 To .Count - 1 With .Item(iMessage) Dim iAttachement As Long For iAttachement = 0 To .AttachmentsCount - 1 With .Attachment(iAttachement) .Save "c:\temp\" & iMessage & "." & .Name End With Next End With Next End With
The file name of each attachment is prefixed by the message's index (0-based), succeeded by the attachment's name such as : 12.image01.png