Outlk 2k3 Script: Pb Using Find function Help plz!!!

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hi all,

I'm using the "Find" & "FindNext" function in a task folder, if I base the
search on the [ Owner ] it is ok, but when I make the search on the company
Name [companies] I've an error "the property isn't available" ??

Set mypublicfolder = Application.GetNamespace("MAPI").Folders("dossiers
publics").Folders("tous les dossiers publics").Folders("MyTaskFolder")
Set Items = mypublicfolder.Items
set myItem = Items.Find("[companies] = 'CompABC'")
Body = body & myitem.companies &" " & myItem.mileage &" "&
myitem.creationTime & chr(13)
do while not (Item Is Nothing)
set myItem = Items.FindNext
Body = body & myitem.companies &" " & myItem.mileage &" "&
myitem.creationTime & chr(13)
loop

if I replace the search by this
set myItem = Items.Find("[owner] = 'UserABC'") It works fine

Tks for Help
 
[Companies] is not permitted in a filter or restriction.

For a list of what you can't use see the Help for Items.Restrict
 
Back
Top