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

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 15th 06, 11:23 AM posted to microsoft.public.outlook.program_vba
news.microsoft.com
external usenet poster
 
Posts: 65
Default Outlk 2k3 Script: Pb Using Find function Help plz!!!

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


Ads
  #2  
Old November 15th 06, 03:40 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlk 2k3 Script: Pb Using Find function Help plz!!!

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

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

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"news.microsoft.com" wrote in message
...
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



 




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
Outlook 2k3 Script: Pb While exporting to Excel news.microsoft.com Outlook and VBA 1 November 14th 06 05:24 PM
Outlook 2k3 Script: ProgressBar while exporting ??? bbnimda Outlook and VBA 2 November 13th 06 08:26 AM
Outlook 2k3 Script: Ordering a combo news.microsoft.com Outlook and VBA 1 November 10th 06 04:05 PM
Outlook 2k3 Script: Pb extracting list of items news.microsoft.com Outlook and VBA 4 November 7th 06 07:42 AM
Outlook 2k3 RPC over HTTP Script vzerbonia Outlook - Installation 0 July 27th 06 07:35 PM


All times are GMT +1. The time now is 07:55 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.