Hi,
I have a macro which goes to my outlook inbox and saved all attatchments. Is there a way to ammend the code to save only EXCEL files and ignore any other attatchements.
Here is the section of code which saves the files:
ThanksFor Each Item In myfolder.Items For Each Atmt In Item.Attachments FileName = "H:\Emials\" & Atmt.FileName Atmt.SaveAsFile FileName i = i + 1 Next Atmt Next Item
Not sure, but maybe
Filename = "H:\Emials\" & Atmt.Filename If InStr(Filename, ".xls") Then Atmt.SaveAsFile Filename
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks