+ Reply to Thread
Results 1 to 2 of 2

only one attachemnt saved

  1. #1
    Registered User
    Join Date
    09-23-2014
    Location
    Warsaw
    MS-Off Ver
    2010
    Posts
    1

    only one attachemnt saved

    Hello

    I have following code


    For Each Item In SubFolder.Items
    For Each Atmt In Item.Attachments
    If LCase(Right(Atmt.FileName, Len(ExtString))) = LCase(ExtString) Then
    FileName = DestFolder & Item.SenderName & SenderEmailAddress & " " & Atmt.FileName
    Atmt.SaveAsFile FileName
    I = I + 1


    End If
    Next Atmt
    Next Item

    i tried diffrent methods including Item.Attachemnt.Count but only one attachment (from 2 ) is saved.....

  2. #2
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: only one attachemnt saved

    Assuming you stepped through and saw the loop run through twice then two possible reasons. The first attachment is being overwritten or one attachment did not have the correct ExtString.
    To mark "Solved" go to Thread Tools.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 01-09-2012, 04:07 AM
  2. Macro that will prompt for file attachemnt
    By romyjames in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2011, 08:19 PM
  3. Macro For Sending Mail with Attachemnt
    By manian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2011, 01:10 AM
  4. VLOOKUP & LEFT - With attachemnt
    By Sordini in forum Excel General
    Replies: 2
    Last Post: 02-04-2009, 06:32 AM
  5. [SOLVED] How can I see a copy of a saved workbook before I saved it again?
    By Norma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-11-2005, 06:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1