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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Processing Email Messages in .pst, changing email addresses



 
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old August 26th 09, 02:33 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Processing Email Messages in .pst, changing email addresses

You would have to add new recipients with the desired characteristics and
remove the existing ones.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"akumar" wrote in message
...
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


  #3  
Old August 26th 09, 06:00 PM posted to microsoft.public.outlook.program_addins
akumar
external usenet poster
 
Posts: 3
Default Processing Email Messages in .pst, changing email addresses

Awesome, I'll use that for To, CC and BCC. Can you help me with the
SenderAddress. I suspect that this technique won't work for SenderAddress.

-ak

"Ken Slovak - [MVP - Outlook]" wrote:

You would have to add new recipients with the desired characteristics and
remove the existing ones.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"akumar" wrote in message
...
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



  #4  
Old August 26th 09, 09:28 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Processing Email Messages in .pst, changing email addresses

Do you mean SenderEmailAddress? That's a read-only string property, not much
you can do about that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"akumar" wrote in message
...
Awesome, I'll use that for To, CC and BCC. Can you help me with the
SenderAddress. I suspect that this technique won't work for SenderAddress.

-ak


  #5  
Old August 27th 09, 11:12 AM posted to microsoft.public.outlook.program_addins
akumar
external usenet poster
 
Posts: 3
Default Processing Email Messages in .pst, changing email addresses

Well, as it turns out, the suggestion re other recipients was also not
workable. In order to save the changes, I have to call lMailItem.Save which
promptly resets the dates on the message.

"Ken Slovak - [MVP - Outlook]" wrote:

Do you mean SenderEmailAddress? That's a read-only string property, not much
you can do about that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"akumar" wrote in message
...
Awesome, I'll use that for To, CC and BCC. Can you help me with the
SenderAddress. I suspect that this technique won't work for SenderAddress.

-ak



  #6  
Old August 27th 09, 02:08 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Processing Email Messages in .pst, changing email addresses

Of course you have to save any changes to make them persistent, and that
will change dates. There's really no way to change an item in any way
without changing various date properties.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"akumar" wrote in message
...
Well, as it turns out, the suggestion re other recipients was also not
workable. In order to save the changes, I have to call lMailItem.Save
which
promptly resets the dates on the message.


 




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
migrating email addresses and email messages from OutExpr to Outlo Chas F Outlook - Using Contacts 3 December 11th 08 07:51 PM
How do I automatically add email addresses from messages to my contacts in Outlook 2007? [email protected] Outlook - Using Contacts 2 April 2nd 07 01:08 PM
Rules Processing of Group Addresses Norman Litell Outlook Express 13 August 12th 06 07:56 PM
receiving email never finishes processing Regina Outlook - General Queries 0 May 24th 06 01:45 PM
How to save email addresses automatically from sent messages? Yo Outlook - Using Contacts 2 April 6th 06 01:30 PM


All times are GMT +1. The time now is 09:22 AM.


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.