PR_RTF_COMPRESSED & PR_BODY NOT SYNC'd After RTFSYNC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here's a unique problem I hope someone can answer for me.

Environment:
Outlook 2003 (SP2)
Windows XP (SP2)
My VS2005 C++ program to manipulate Outlook via CDO Message Store
My VS2005 C++ program to manipulate Outlook via Oultook Object Model

Requirements:
- I need to be able to directly update the RTF in the body of an outlook
item Task, JournalItem, Contact, etc. Let's focus on JournalItem. I have
plenty of examples that I have successfully used in earlier versions of
Outlook like 2002 without problems.

Setting:
- I use Outlook Object API within C++ to create a new message and write all
the properties to the item that I need using the same. When it comes to the
Body of the item, I use the CDO API to write directly to PR_RTF_COMPRESSED
and at the end of my logic I run RTFSync to sync it to my PR_BODY.

Problem:
My newly created journal item or my existing recently modified journal item
accepts the RTF code, but it is not displayed or accepted by the journalitem
even after I call _journalitemptr's Save() and/or Close(olSave) functions.

Suspect:
- It seams like RTFSync and SaveChanges(KEEP_OPEN_READWRITE) do not return
an error and update the journalitem object, but they do not update the
display within outlook either.

What am I missing?
 
It is still the same after you restart Outlook? Are ou sure it is not
Outlook caching an item and not reading the (updated) properties?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Excellent Question! If I kill the Outlook.exe process and then restart
outlook. the information shows up. So I suspect that it is related to
caching.

How do I handle that? I'm new to the chaching concept in outlook 2003.

Thank you
Ben
 
If Outlook is currently displaying that message, there is nothing you can
do. If the item is explicitly referenced by your code through the Outlook
Object model, you need to completely dereference it.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Please reply to the newsgroup only - let everybody benefit from the
discussion.
Pretty hard to say without seeing the actual code. Can you post the relevant
code snippets?
Where does the message to be updated come from?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top