PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Script:How to: Search base on EntryID ?
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Outlook Script:How to: Search base on EntryID ?
![]() |
Outlook Script:How to: Search base on EntryID ? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Outlook 2003 + Sbs 2003
Hi All, I'm trying to make a search using entry ID, but I didn't success here's my code Set myFolder = Application.GetNamespace("MAPI").Folders("").Folders("")....... Set myItems = myFolder.Items strFind = "[EntryID]= " & Chr(34) & iDSoc & Chr(34) set myItem = myItems.Find(strFind) If not (myItem Is Nothing) then => here i realise my condition if I found my contact end if What's wrong with my code ? -- Knowlege grows when shared. http://bensoft.miniville.fr/tra |
|
|
|
#2 |
|
Guest
Posts: n/a
|
If you read the Help topic on Find, you'll see that EntryID is not a field available for use with the Find method. Instead, use the Namespace.GetItemFromID method. If you have reason to expect it to be in a non-default store, iterate Namespace.Folders and get the StoreID from each store and try it with GetItemFromID.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "bbnimda" <wahhhran-vba@yahoo.fr> wrote in message news:eHXagYcNIHA.1188@TK2MSFTNGP04.phx.gbl... > Outlook 2003 + Sbs 2003 > > Hi All, > > I'm trying to make a search using entry ID, but I didn't success > > > > here's my code > > Set myFolder = > Application.GetNamespace("MAPI").Folders("").Folders("")....... > > Set myItems = myFolder.Items > > strFind = "[EntryID]= " & Chr(34) & iDSoc & Chr(34) > > set myItem = myItems.Find(strFind) > > If not (myItem Is Nothing) then > > => here i realise my condition if I found my contact > > end if > > > > What's wrong with my code ? |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

