Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / March 2009

Tip: Looking for answers? Try searching our database.

redemption MAPIUtils

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WLAN - 24 Mar 2009 02:12 GMT
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
Ken Slovak - [MVP - Outlook] - 24 Mar 2009 14:40 GMT
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.

Signature

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

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thanks
wlan - 24 Mar 2009 17:45 GMT
Thanks Ken.

I'm calling messageItem.Save. But I'm not clear about 'alert outlook' part.
Ken Slovak - [MVP - Outlook] - 24 Mar 2009 18:11 GMT
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.

Signature

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

> Thanks Ken.
>
> I'm calling messageItem.Save. But I'm not clear about 'alert outlook'
> part.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.