I created and saved the Forward MailItem. I then created
the SafeMailItem from it.
oRdpMailNew.Item = oMapiMailNew
' Sender Email
oRdpMailNew.Fields(&H0C1F001E) = "(e-mail address removed)"
' Sender Name
oRdpMailNew.Fields(&H0C1A001E) = "Bingo"
' Since both Sender EntryID and Search Key are binary
' fields, I'm not sure what I need to do with them
' oRdpMailNew.Fields(&H0C190102)
' oRdpMailNew.Fields(&H0C1D0102)
I checked both Sender Email and Name fields and they took
the new values. Then I displayed the email.
oMapiMailNew.Display
The From field still has another person's name and email
not mine. How do I reset the PR_Sender_XX fields
correctly? Thanks.
Outlook does not see changes made with anything but the Outlook Object Model
until you completely dereference the message and then reopen it Add
something like the following:
strEntryID = oMapiMailNew.EntryID
set oMapiMailNew = Nothing
set oRdpMailNew = Nothing
'reopen it
set oMapiMailNew = Application.Session.GetItemFromID(strEntryID)
oMapiMailNew.Display
I tried it and it still returns another person's name and
email not mine. After I reopened the new MailItem, I
passed it to a new SafeMailItem. Then I checked both
Sender Name and Emails fields, both are reset back to
their original values. Do I need to set the Sender's
EntryID and Search Key fields? Since both are binary
fields, I do not know how to set them. Thanks. Bingo
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.