S
stijnheadstart
I know this is a VBa forum but maybe you guys can help.
Name of the game: importing e-mail messages from my own application t
Outlook.
Seems whenever I try to save them, Outlook doesn't want me to mark the
as read or sent, for some funny reason the body of the e-mail does'n
get filled in and i can still change the text of the subject, to an
body. I don't want this. I've downloaded the e-mails in my ow
application from a pop3 server so I want them to be displayed i
Outlook as sent/received in the inbox.
I'd read you need to use a little something called redemption for thi
and i found some code for it:
Dim item As PostItem
Dim PR_ICON_INDEX As String
Dim strentryID As String
PR_ICON_INDEX = &H10800003
item = app.CreateItem(OlItemType.olPostItem) 'create
Post item instead of a regular (unsent) message
item.Save()
'otherwise EntryId is inaccessible
strentryID = item.EntryID
item = Nothing 'dereference and reopen th
item, otherwise Outlook overwrites our change to the MessageClas
property
item = app.Session.GetItemFromID(strentryID)
item.MessageClass = "IPM.Note"
Dim ritem As Object
ritem = CreateObject("Redemption.SafeMailItem")
ritem.Item = item
ritem.Fields(PR_ICON_INDEX) = Nothing 'delete the property
otherwise the message is shown with a wrong icon
item.Save()
ritem.import(mymail) 'or call CopyTo(). Or set th
properties one by one.
ritem.Save()
item = Nothing
ritem = Nothing
At the ritem = createobject("Redemption.SafeMailItem") line, my visua
studio says he's unable to create an activeX object.
If someone know what to do with this, or if someone knows another wa
to achieve my objective, please let me know!
Thanks in advance
Name of the game: importing e-mail messages from my own application t
Outlook.
Seems whenever I try to save them, Outlook doesn't want me to mark the
as read or sent, for some funny reason the body of the e-mail does'n
get filled in and i can still change the text of the subject, to an
body. I don't want this. I've downloaded the e-mails in my ow
application from a pop3 server so I want them to be displayed i
Outlook as sent/received in the inbox.
I'd read you need to use a little something called redemption for thi
and i found some code for it:
Dim item As PostItem
Dim PR_ICON_INDEX As String
Dim strentryID As String
PR_ICON_INDEX = &H10800003
item = app.CreateItem(OlItemType.olPostItem) 'create
Post item instead of a regular (unsent) message
item.Save()
'otherwise EntryId is inaccessible
strentryID = item.EntryID
item = Nothing 'dereference and reopen th
item, otherwise Outlook overwrites our change to the MessageClas
property
item = app.Session.GetItemFromID(strentryID)
item.MessageClass = "IPM.Note"
Dim ritem As Object
ritem = CreateObject("Redemption.SafeMailItem")
ritem.Item = item
ritem.Fields(PR_ICON_INDEX) = Nothing 'delete the property
otherwise the message is shown with a wrong icon
item.Save()
ritem.import(mymail) 'or call CopyTo(). Or set th
properties one by one.
ritem.Save()
item = Nothing
ritem = Nothing
At the ritem = createobject("Redemption.SafeMailItem") line, my visua
studio says he's unable to create an activeX object.
If someone know what to do with this, or if someone knows another wa
to achieve my objective, please let me know!
Thanks in advance