Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / August 2005

Tip: Looking for answers? Try searching our database.

MAPITable on Tasks Folder with a Contacts Restriction

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sonomaenterprises - 25 Aug 2005 22:00 GMT
I am trying to use a MAPITable on the default tasks folder with a restriction
on Contacts field.  Everytiem I attempt to apply the restriction the table
throws a MAPI_E_INVALID_PARAMETER error.  I assume this is due to the kind of
MNID_ID versuses MNID_STRING kind.  What I am doing is:

PR_CONTACTS =
sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H819B) Or
PT_STRING8 Or &H1000
Set Filter = table.Filter
Filter.Clear
Set Restr = Filter.SetKind(RES_CONTENT)
Restr.ulFuzzyLevel = FL_SUBSTRING Or FL_IGNORECASE
Restr.ulPropTag = PR_CONTACTS
Restr.lpProp = oContact.FullName
Filter.Restrict

Any suggestions on how to configure this to be able to restrict on the
contacts field of the tasks folder?

Ken Slovak - [MVP - Outlook] - 26 Aug 2005 14:28 GMT
Are you positive about that &H819B ID?

On my machines here the ID value for Contacts is &H853A. I can get Contacts
as a PT_MV_STRING8 value by using this:

GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H853A) Or
PT_STRING8 Or &H1000

Signature

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

>I am trying to use a MAPITable on the default tasks folder with a
>restriction
[quoted text clipped - 16 lines]
> Any suggestions on how to configure this to be able to restrict on the
> contacts field of the tasks folder?
sonomaenterprises - 26 Aug 2005 15:47 GMT
You are correct H853A is the ID, I was trying other things (grasping...) when
I copied this code and forgot to change it back.

It still fails with the correct ID.  I assume it has something to due with
the "Kind" of the field since it is ID and not String, I am just not sure
what to change.

Jack

> Are you positive about that &H819B ID?
>
[quoted text clipped - 24 lines]
> > Any suggestions on how to configure this to be able to restrict on the
> > contacts field of the tasks folder?
sonomaenterprises - 26 Aug 2005 21:57 GMT
Found it!  Careless mistake, I did not have PT_STRING8 initialized.

Thanks,

Jack

> You are correct H853A is the ID, I was trying other things (grasping...) when
> I copied this code and forgot to change it back.
[quoted text clipped - 33 lines]
> > > Any suggestions on how to configure this to be able to restrict on the
> > > contacts field of the tasks folder?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.