Getting EntryID After Moving Item

  • Thread starter Thread starter Dan Johnson
  • Start date Start date
D

Dan Johnson

We're using VB6 code similar to the following to copy an Outlook item to a
folder:

Set myItem = myolApp.CreateItem(olMailItem)
Set myCopiedItem = myItem.Copy
myCopiedItem.Move myNewFolder

Is there any way to get the EntryID of the myCopiedItem object in
myNewFolder without having to close myCopiedItem, then iterate through all
of the items in myNewFolder until we find it? We've tried saving
myCopiedItem (gives same EntryID before and after Save, but then later
changes the EntryID after closing).

Thanks for any feedback!

Dan
 
Try:

Set myMovedItem = myCopiedItem.Move(myNewFolder)
MsgBox myMOvedItem.EntryID
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top