View Single Post
 
Old 01-04-2016, 11:55 AM
charlesdh charlesdh is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

The problem was a error on my part. The file that is working for me is not the one I posted
here.

The line of code I posted was incorrect. Her's what this part of the could should have been.
Code:
If oOlItm.Attachments.Count <> 0 Then
            For Each oOlAtch In oOlItm.Attachments
                '~~> Download the attachment
                oOlAtch.SaveAsFile oOlAtch.Filename''Corrected to this
                Exit For
            Next
        Else
            MsgBox "The First item doesn't have an attachment"
        End If
Reply With Quote