2012-07-03 114 views
0

可能重複保存Outlook郵件的Excel附件在Windows中指定的文件夾:
how to save excel file attached in an email received in a defined sub folder in the inbox of outlook 2007 to a folder on the windows?使用Outlook VBA

我真的需要一個Outlook VBA函數自動保存在Excel附件一個名爲daily的給定收件箱子文件夾和windows的目標文件夾具有路徑C:/每日報告,所以我感謝您的幫助和支持。

感謝,

+0

尊敬的先生們,很抱歉對於干擾,但如果你能幫助我解決上述問題,我將非常感激。再次感謝 – user1317100

回答

0

enter code here您可以使用下面的腳本,並從規則和通知從Outlook運行它,並應用在需要的用戶或項目

Public Sub saveAttachtoDisk(itm As Outlook.MailItem) 
Dim objAtt As Outlook.Attachment 
Dim saveFolder As String 
saveFolder = "E:\Attachments\" 
    For Each objAtt In itm.Attachments 
     objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName 
     Set objAtt = Nothing 
    Next 
End Sub 

感謝,