• Subject: Attatchment detach issues VB-Help
  • Author: Rivers
  • Date: 02 Jul
  • References:
hi peeps thanks before hand for any help you can give,

i found this code on a website that pulls the attatchments off of the emails
and stores them into a specified folder. its brilliant except for a few tiny
gltches i have found.

1. All the emails are not being processed (i put a count in along with a
messagebox to check, i put 12 emails into the folder with only xls files but
ony 7 get transfered)
2. if the email hs multilple attatchments it only takes one

can anyone help with this? i have put below the code

thanks again

Rivers

For Each Item In SubFolder.Items
For Each Atmt In Item.Attachments
sel = SubFolder.Items.Count
MsgBox sel

If Right(Atmt.FileName, 3) = "xls" Then

FileName = "C:\Documents and Settings\me\My Documents\Email
Attachments\" & Atmt.FileName
Atmt.SaveAsFile FileName
Item.Move otherInbox.Folders("Flash Processed")
i = i + 1
End If
Next Atmt
Next Item
02 JulAttatchment detach issues VB-Help.Rivers
02 Jul\ Re: Attatchment detach issues VB-Help.Ken Slovak - [MVP - O...
02 Jul   \ Re: Attatchment detach issues VB-Help.Rivers
03 Jul      \ Re: Attatchment detach issues VB-Help.Rivers
03 Jul         \ Re: Attatchment detach issues VB-Help.Ken Slovak - [MVP - O...
03 Jul            \ Re: Attatchment detach issues VB-Help.Rivers
03 Jul               \ Re: Attatchment detach issues VB-Help.Ken Slovak - [MVP - O...
03 Jul                  \ Re: Attatchment detach issues VB-Help.Rivers
03 Jul                     \ Re: Attatchment detach issues VB-Help.Ken Slovak - [MVP - O...
04 Jul                        \ Re: Attatchment detach issues VB-Help.Rivers
04 Jul                           \ Re: Attatchment detach issues VB-Help.Rivers
07 Jul                              \ Re: Attatchment detach issues VB-Help.Ken Slovak - [MVP - O...
All times are in (US) Eastern Daylight Time (GMT -4:00)