A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Redemption Import



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 20th 07, 03:45 AM posted to microsoft.public.outlook.program_vba
Indra
external usenet poster
 
Posts: 1
Default Redemption Import

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  
Old March 20th 07, 06:42 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Redemption Import

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2025 Outlook Banter.
The comments are property of their posters.