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 Add-Ins / May 2004

Tip: Looking for answers? Try searching our database.

Chickens, Eggs, EntryID, and Reply Body Text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 28 May 2004 17:49 GMT
Hello,

I'm still working on my Extended MAPI wrapper code to avoid the
Outlook security warning when reading objMailItem.Body.

I have initial code working and I can now read PR_BODY using EntryID.

But I have run into a chicken-and-egg problem.  When 'Reply' is
selected, there is not yet any EntryID for the new item created by the
Inspector so I can't use my Extended MAPI code to read PR_BODY to see
if this is a message of interest to my Add-In.

However, objMailItem.Body *can* read the body text prior to the Save
that would create the EntryID.

So unless the security warning only occurs when reading
objMailItem.Body for an item that has not yet been Saved, then
replacing objMailItem.Body reads with calls to Extended MAPI PR_BODY
reads will not take care of everything.

I am going to start thinking about Rube Goldberg code that somehow
keeps track of previously selected mail items, stores the result of
PR_BODY reads before Reply is selected, and somehow ties that back to
the current Inspector when Reply is selected and the EntryID is found
to be empty.

Ouch.

Has anyone figured out a simple clean way to handle this?  What am I
missing?

Thanks.

Jim
Dmitry Streblechenko \(MVP\) - 28 May 2004 20:09 GMT
You are not really missing anything - until the message is saved, all
modifications live in Outlook internal memory and can only be accessed using
Outlook Object Model.

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

> Hello,
>
[quoted text clipped - 30 lines]
>
> Jim
 
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



©2008 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.