Redemption Import

I

Indra

Hi

I am importing mails from MSG files to my custom folder using Redemption
library. Import is working fine. But when I try to open the imported item, I
am not able to see “From†field. It shows only “TOâ€, “CC†and “BCCâ€.

Code Snippet (for import):

=====================================================

Dim sItem
Dim oItem As Outlook.MailItem
Dim iGateMails As MAPIFolder
Dim inboxFolder As MAPIFolder

Dim ns As NameSpace
Set ns = Application.GetNamespace("MAPI")

Set iGateMails = ns.Folders.Item("XXXXXXX")
Set inboxFolder = iGateMails.Folders.Item("Inbox")
'Application.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox)


For i = 1 To 52

Set sItem = CreateObject("Redemption.SafeMailItem")
Set oItem =
Application.Session.GetDefaultFolder(OlDefaultFolders.olFolderInbox).Items.Add(OlItemType.olMailItem)

sItem.Item = oItem
strinfIle = "c:\temp\Test" & i & ".eml"
sItem.Import strinfIle, rdoSaveAsType.olRFC822 'olMSG, olRFC822 and
olTNEF formats are supported
sItem.Save
sItem.Move inboxFolder

Next i
=====================================================

How to show “From†field for the imported items in my custom folder?

Regards

Indra
 
D

Dmitry Streblechenko

Do these EML file actually have any sender related properties?
I'd rather use the RDO family of objects to do the import - RDO creates
messages where it is told (unlike OOM which always creates messages in the
Drafts folder), you can set the Sent ptroperty, etc.
Off the top of my head:

set Session = CreateObject("Redemption.RDOSession")
Session.MAPIOBJECT = Application.Session.MAPIOBJECT 'Outlook 2002 and up
only
set InboxFolder = Session.GetDefaultFolder(olFolderInbox)
set sItem = InboxFolder.Items.Add("IPM.Note")
sItem.Sent = true
sItem.Import ..., 1024
sItem.Save


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top