![]() |
#2
|
||||
|
||||
![]()
How about
Code:
Public Sub Save_APPS(itm As Outlook.MailItem) Dim objAtt As Outlook.Attachment Dim saveFolder As String Dim vExt As Variant saveFolder = "P:\Data\" For Each objAtt In itm.Attachments If InStr(objAtt.fileName, ".xls") Then vExt = Split(objAtt.fileName, Chr(46)) objAtt.SaveAsFile saveFolder & "\" & _ Left(objAtt.fileName, 5) & _ Chr(46) & vExt(UBound(vExt)) End If Next Set objAtt = Nothing End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlooks changes name of the attachment. | olegred | Outlook | 0 | 08-17-2016 03:01 PM |
Outlook macro to check a value of a cell in an attachment and send an email based on that value | ketangarg86 | Outlook | 13 | 03-25-2015 07:11 AM |
![]() |
rudi.scott | Outlook | 1 | 06-30-2011 06:44 AM |
![]() |
Nexus | Mail Merge | 12 | 04-13-2011 11:34 PM |
Word attachment on an E-mail-macro to open attachment & | nablady | Outlook | 0 | 11-28-2006 03:00 PM |