View Single Post
  #1  
Old August 26th 09, 01:16 PM posted to microsoft.public.outlook.program_addins
akumar
external usenet poster
 
Posts: 3
Default Processing Email Messages in .pst, changing email addresses

I am trying to process .pst files with years or archived email. Many of the
email messages came from backing-up email that I received on Microsoft
Exchange servers.

As a result, many of the messages have Sender, and Recipient email addresses
stored in "EX" format.

I would like to process these .pst files and change the "EX" email addresses
to some "SMTP" like string (and change the type to "SMTP") so that I can
import into gmail.

I can locate the message, I can locate the addresses, BUT all of the
Recipient objects are read-only.

I am not trying to send email as another user, or add other users to a
message; just change the TYPE and Email Address so that the import to GMAIL
(through IMAP) works correctly.

How do I go about doing this.

As a point of reference, here is some code ... Procedure below will
recursively process folders, assume that it is called with some top level
folder. I'm looking for code to stick in the place that has the comment 'Fill
in code here ...

Public Sub ProcessFolder(ByVal pFolder As Outlook.MAPIFolder)
Dim lSubFolderList As Outlook.Folders
Dim lSubFolder As Outlook.MAPIFolder
Dim lItems As Outlook.Items
Dim lItem As Object
Dim lMailItem As Outlook.MailItem

Set lSubFolderList = pFolder.Folders
Set lSubFolder = lSubFolderList.GetFirst

Do While Not lSubFolder Is Nothing
Call ProcessFolder(lSubFolder)
Loop

Set lItems = pFolder.Items
For Each lItem In lItems
If (lItem.Class = olMail) Then
Set lMailItem = lItem
' Fill in code here ...

End If
Next
End Sub

Ads