![]() |
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |