A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Outlook » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Copying properties from one mail to another



 
 
Thread Tools Display Modes
  #1  
Old October 10th, 2009, 03:53 AM posted to microsoft.public.outlook.general
John1170
external usenet poster
 
Posts: 1
Default Copying properties from one mail to another


I have 600+ emails that have lost the Sender information in a folder that
contains a copy of my historical sent items

I have found i can copy the PR_SENT_REPRESENTING_NAME field from one email
to another with Outlookspy

but how can i copy that property from one to 600+ messages? without
individually copying them one mail at a time

Outlook Spy:
Copying properties from one object to another. I have two objects with
different sets of properties and I want to copy one or more property from one
object to another.

You can simply select any number of properties on one object (be that
IMessage, IMAPIFolder or any other Extended MAPI object derived from
IMAPIProp) and drop them on the GetProps tab of any another IMAPIProp
descendant. OutlookSpy will call IMAPIProp::CopyProps() on the first object
and then save the second object.




  #2  
Old October 10th, 2009, 08:06 AM posted to microsoft.public.outlook.general
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,346
Default Copying properties from one mail to another



For this VBA example you need to download and install the Redemption from
www.dimastr.com. It writes "whatever" into the field
'pr_sent_representing_name'. See if that works; I wouldn't be suprised if
you also have to set the other pr_sent_representing_* fields (which you see
with OutlookSpy too).

Public Sub Whatever()
Dim Session as Redemption.RDOSession
Dim Folder as Redemption.RDOFolder
Dim Item as Redemption.RDOMail
Set Session=CreateObject("Redemption.RDOSession")
Session.MapiObject=Application.Namespace.MapiObjec t
Set Folder=Session.Pickfolder
For Each Item in Folder
Item.Fields(&H0042001E)="whatever"
Item.Save
Next
End Sub

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


Am Fri, 9 Oct 2009 19:53:01 -0700 schrieb John1170:

I have 600+ emails that have lost the Sender information in a folder that
contains a copy of my historical sent items

I have found i can copy the PR_SENT_REPRESENTING_NAME field from one email
to another with Outlookspy

but how can i copy that property from one to 600+ messages? without
individually copying them one mail at a time

Outlook Spy:
Copying properties from one object to another. I have two objects with
different sets of properties and I want to copy one or more property from

one
object to another.

You can simply select any number of properties on one object (be that
IMessage, IMAPIFolder or any other Extended MAPI object derived from
IMAPIProp) and drop them on the GetProps tab of any another IMAPIProp
descendant. OutlookSpy will call IMAPIProp::CopyProps() on the first

object
and then save the second object.

 




Thread Tools
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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.