D
Dmitry Streblechenko
It is the same MailItem, but its Sent property is true. Generally, you
cannot create new messages in the sent state in OOM (Sent property is
read-only). The workaround is to create a PostItem (which is created in the
sent state), then change its message class to IPM.Note:
set Msg = Application.CreateItem(olPostItem)
Msg.Body = "body"
Msg.Subject = "subject"
Msg.MessageClass = "IPM.Note"
Msg.Save
EntryID = Msg.EntryID
set Msg = Nothing
set Msg = Application.Session.GetItemFromID(EntryID)
Msg.Display
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
cannot create new messages in the sent state in OOM (Sent property is
read-only). The workaround is to create a PostItem (which is created in the
sent state), then change its message class to IPM.Note:
set Msg = Application.CreateItem(olPostItem)
Msg.Body = "body"
Msg.Subject = "subject"
Msg.MessageClass = "IPM.Note"
Msg.Save
EntryID = Msg.EntryID
set Msg = Nothing
set Msg = Application.Session.GetItemFromID(EntryID)
Msg.Display
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool