View Single Post
 
Old 01-03-2016, 06:15 PM
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 Error Saving Outlook attachment Via Excel code

HI,

Hate to say this but, I have a problem that I can not resolve.
In this part of the code is where I get a error for permission. It worked on Saturday. But, when I went back to it today(Sunday) to test before I moved it to my actual project it failed me.

Code:
If oOlItm.Attachments.Count <> 0 Then
            For Each oOlAtch In oOlItm.Attachments
                '~~> Download the attachment
                oOlAtch.SaveAsFile NewFileName & oOlAtch.Filename''Failes here
                Exit For
            Next
        Else
            MsgBox "The First item doesn't have an attachment"
        End If
Attached Files
File Type: xlsm TestOutlookCode.xlsm (14.2 KB, 10 views)
Reply With Quote