gpt4 book ai didi

python - Outlook.OlSaveAsType.olMSG

转载 作者:行者123 更新时间:2023-12-01 04:51:01 39 4
gpt4 key购买 nike

reportPath = "C:\\Test\\"

oApp = win32com.client.Dispatch("Outlook.Application")

nSpace = oApp.GetNamespace("MAPI")

nSpace.Logon()

oInbox = nSpace.GetDefaultFolder(win32com.client.constants.olFolderInbox)

oItems = oInbox.Items

for i in range(oItems.Count):

oMsg = oItems.Item(i+1)
oMsg.SaveAs(reportPath+str(i)+".msg", Outlook.OlSaveAsType.olMSG)

oMsg.SaveAs 失败,因为 "Outlook.OlSaveAsType.olMSG" 参数无效。win32com 中它的等价物是什么?

请帮忙

最佳答案

尝试传递一个数值 (olMSG = 3)。或者直接删除第二个参数,它是可选的。

关于python - Outlook.OlSaveAsType.olMSG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28481263/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com