【发布时间】:2016-05-28 12:05:51
【问题描述】:
我正在尝试将 Outlook 电子邮件中的附件(文件是 NRG 原始数据文件)保存到我的桌面,但收到以下错误:“AttributeError:
一切正常(我认为),直到我尝试保存文件...
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.Folders["myinboxfolder"].Folders["Inbox"].Folders["[folder i need]"]
messages = inbox.Items
message = messages.GetLast()
attachment = message.attachments
attachment.SaveAsFile('C:\Users\my name \Desktop\Unsorted' + attachment.FileName)
谢谢
【问题讨论】: