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

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
 
K

Ken Slovak - [MVP - Outlook]

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top