![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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(OlDefaultFol ders.olFolderInbox) For i = 1 To 52 Set sItem = CreateObject("Redemption.SafeMailItem") Set oItem = Application.Session.GetDefaultFolder(OlDefaultFold ers.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 |
Ads |
#2
|
|||
|
|||
![]()
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 "Indra" wrote in message news ![]() 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(OlDefaultFol ders.olFolderInbox) For i = 1 To 52 Set sItem = CreateObject("Redemption.SafeMailItem") Set oItem = Application.Session.GetDefaultFolder(OlDefaultFold ers.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Redemption Object | Safal | Outlook - Calandaring | 0 | December 29th 06 10:06 AM |
Redemption not working :( | [email protected] | Add-ins for Outlook | 6 | June 22nd 06 03:12 PM |
Redemption | Christoph | Add-ins for Outlook | 5 | March 6th 06 03:26 PM |
Convert to Redemption ??? | John DOE | Outlook and VBA | 2 | February 13th 06 06:22 AM |
Crash with Redemption | Lars Ibsen | Outlook and VBA | 4 | February 13th 06 05:29 AM |