redemption MAPIUtils

Status
Not open for further replies.
V

V0xBTg

Hi,

I'm setting some custom properties using Redemption.MAPIUtils interface.

MessageItem interface is accessed from MAPIUtils and each property is set to

the mail message using HrSetOneProp() function.

The problem is that these properties are not available now. i need to

restart outlook for getting these values. I have checked the same using

Outlook Spy and it didn't show those properties. Once I restart outlook, it

shows all properties.

What is the issue? How do I resolve it?

I need to read those properties after setting it.

Thanks
 
K

Ken Slovak - [MVP - Outlook]

I assume you saving the MessageItem?

You probably also need to alert Outlook that the item underlying the

MessageItem has changed. Usually we use a trick like this, where item would

be the item underlying the MessageItem object:

item.Subject = item.Subject

item.Save

That should be done after saving the MessageItem and releasing references to

it.

"WLAN" <WLAN> wrote in message

news:1F808BCE-60CB-4C6D-8C0E-03294FB636CE@microsoft.com...
> Hi,

> I'm setting some custom properties using Redemption.MAPIUtils interface.
> MessageItem interface is accessed from MAPIUtils and each property is set
> to
> the mail message using HrSetOneProp() function.

> The problem is that these properties are not available now. i need to
> restart outlook for getting these values. I have checked the same using
> Outlook Spy and it didn't show those properties. Once I restart outlook,
> it
> shows all properties.

> What is the issue? How do I resolve it?

> I need to read those properties after setting it.

> Thanks
>
 
D

d2xhbg

Thanks Ken.

I'm calling messageItem.Save. But I'm not clear about 'alert outlook' part.
 
K

Ken Slovak - [MVP - Outlook]

Outlook doesn't know about changes made to items using Extended MAPI, for

which Redemption is a wrapper (more or less). So until it's restarted or an

object is unloaded and re-loaded it doesn't know about changes you made.

That little hack of setting Subject equal to itself on the original Outlook

item and then saving that forces Outlook to re-read the MAPI properties and

become aware of your changes using Redemption.

"wlan" <wlan> wrote in message

news:B9D98C92-986A-4D26-BFB6-D1687BC15C41@microsoft.com...
> Thanks Ken.

> I'm calling messageItem.Save. But I'm not clear about 'alert outlook'
> part.

>
 
Status
Not open for further replies.
Top