A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Script:How to: Search base on EntryID ?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 3rd 07, 05:05 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 94
Default Outlook Script:How to: Search base on EntryID ?

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("").Folde rs("").......

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


Ads
  #2  
Old December 3rd 07, 05:20 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook Script:How to: Search base on EntryID ?

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" wrote in message ...
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("").Folde rs("").......

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 Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesn't outlook 2007 search work, showing "invalid entryid" kellyk Outlook - Using Contacts 1 October 30th 07 06:41 PM
how do I copy an outlook data base to another computer? mlh185 Outlook - General Queries 1 May 13th 07 05:52 PM
Outlook installed base Frank S Outlook - General Queries 3 January 31st 07 06:53 PM
Outlk 2k3 Script: Saving Excel File programticaly from OUTLOOK SCRIPT news.microsoft.com Outlook and VBA 3 November 22nd 06 04:33 PM
Script to search Outlook message body aptrsn1 Outlook and VBA 1 January 27th 06 04:42 PM


All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.