views:

34

answers:

1

Using RDO 4.8.0.1184 with Delphi 2006 on Exchange 2007 SP3

I have the following code (abbreviated):

Msg := MailSession.GetMessageFromMsgFile(sTempFile, false);
Msg.UnRead := true;
Msg.Save;
Msg.Move(some_folder);
ShowMessage('EntryID: ' +Msg.EntryID);

The resulting dialogue shows an empty EntryID. I've tried printing the EntryID at various places but it is always an empty string. What am I doing wrong?

+2  A: 

Entry ids are only available on the message that exist in a mesage store, whcih is reponsible for openign them given the entry id. There is no MAPI message store for the standalone MSG files.

Or do yo umean you nee the entry id of the newly created message? Keep in mind that Move is a function that returns the newly created message:

Msg = Msg.Move(some_folder);

ShowMessage('EntryID: ' +Msg.EntryID);

Dmitry Streblechenko