How exactly did you call CreateItemFromTemplate?
RDOMail.Sent can be set only before the message is saved for the very first
time, otherwise you will get the MAPI_E_COMPUTED error.
If oyu are using Redemption, why do you even need
Namespace.CreateItemFromTemplate?
Something like the following will do the trick:
set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT
set Folder = Session.GetDefaultFolder(...)
set Msg = Folder.Items.Add
Msg.Sent = true
Msg.Import(..., olMsg)
Msg.Save
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"MON205" <(E-Mail Removed)> wrote in message
news:28AC6640-9C21-489B-BEEB-(E-Mail Removed)...
> Hello,
> I want to load a stand alone MSG file (on disk) into Outlook. To do this,
> I
> tried using the CreateItemFromTemplate() function. This always return
> "invalid argument" when trying to pass a folder as the second argument. To
> go
> over this, I tried ignoring the second parameter. Now, the MSG loaded into
> the DRAFTS folder. Another time, I went over this by moving the mail to
> the
> Inbox. Also, the Message Dates changed (creation / Delivery). These dates
> can
> be updated.
> The problem now that the MSG appaers as "not sent". I tried setting the
> (0xF402) property using OutlookSPY, but that didn't change anything. Also
> Redemption.RDOMail.put_Sent() returned "0x8004011a"!!!!!
> Any help?