PC Review


Reply
Thread Tools Rate Thread

Getting EntryID After Moving Item

 
 
Dan Johnson
Guest
Posts: n/a
 
      8th Nov 2005
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


 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      8th Nov 2005
Try:

Set myMovedItem = myCopiedItem.Move(myNewFolder)
MsgBox myMOvedItem.EntryID
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Dan Johnson" <(E-Mail Removed)> wrote in message news:a2ab7$43712410$d826dfe9$(E-Mail Removed)...
> 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
>
>

 
Reply With Quote
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      8th Nov 2005
Move is a function, not a sub:

set myCopiedItem = myCopiedItem.Move(myNewFolder)

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

"Dan Johnson" <(E-Mail Removed)> wrote in message
news:a2ab7$43712410$d826dfe9$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Dan Johnson
Guest
Posts: n/a
 
      9th Nov 2005
Just what the Doctor ordered!

"Dan Johnson" <(E-Mail Removed)> wrote in message
news:a2ab7$43712410$d826dfe9$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find Appointment Item by EntryID? deko Microsoft Outlook VBA Programming 2 23rd Jan 2006 08:15 PM
EntryID for mail item in outlook =?Utf-8?B?cHBwMDE=?= Microsoft Outlook VBA Programming 6 21st Nov 2005 05:11 PM
Change the entryID of the item in Outlook Semut Microsoft Outlook VBA Programming 1 21st Aug 2004 03:45 PM
Problem getting new EntryID after Item.Move =?Utf-8?B?QW5keUs=?= Microsoft Outlook VBA Programming 2 15th Jan 2004 12:36 PM
contact item deleted but EntryID still exists Theo Maucher Microsoft Outlook Contacts 0 19th Aug 2003 03:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 PM.