[python-win32] Outlook COM: how to create a MailItem from a .msg file
Guy Lateur
guy.lateur at b-b.be
Fri Jul 8 16:29:41 CEST 2005
python version:
import win32com.client
myOL = win32com.client.Dispatch("Outlook.Application")
myNS = myOL.GetNamespace("MAPI")
sItem = win32com.client.Dispatch("Redemption.SafeMailItem")
myDestBox = myNS.GetDefaultFolder(6)
oItem = myDestBox.Items.Add(0)
sItem.Item = oItem
sItem.Import("H:\\Inhoud-iedereen\\Inhoud-Guy\\app\\BBProject\\data\\tes
t\\Leemarchitect.msg", 3)
sItem.Save()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20050708/a4cae2d9/attachment.htm
More information about the Python-win32
mailing list