![]() |
Set "Assigned To" for a Contact Item
I have a custom contact item form that I would like to set the
"Assigned To" field on. It's not part of the ContactItem object model so I think I have to use the PropertyAccessor. Here is my code: Set oItem = oApp.CreateItemFromTemplate("C:\Contact.oft", oFolder) schemaN = "http://schemas.microsoft.com/mapi/proptag/x0e04001f" Set oPA = oItem.PropertyAccessor oPA.SetProperty schemaN, "Eric" I receive the error: The property "http://schemas.microsoft.com/mapi/proptag/x0e04001f" cannot be parsed or has an invalid format Does anyone know if I'm on the right track here or how to do this another way? Thanks for your help |
Set "Assigned To" for a Contact Item
Where do you get Assigned To from, and where did you find that property tag?
Is this similar to assigning a task to someone? For that you have the Owner and Delegator properties, not assigned to. Both of those properties are in the "{00062003-0000-0000-C000-000000000046}" namespace, along with most task named properties. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Koops" wrote in message ... I have a custom contact item form that I would like to set the "Assigned To" field on. It's not part of the ContactItem object model so I think I have to use the PropertyAccessor. Here is my code: Set oItem = oApp.CreateItemFromTemplate("C:\Contact.oft", oFolder) schemaN = "http://schemas.microsoft.com/mapi/proptag/x0e04001f" Set oPA = oItem.PropertyAccessor oPA.SetProperty schemaN, "Eric" I receive the error: The property "http://schemas.microsoft.com/mapi/proptag/x0e04001f" cannot be parsed or has an invalid format Does anyone know if I'm on the right track here or how to do this another way? Thanks for your help |
Set "Assigned To" for a Contact Item
I was given a custom form which is a contact item, and it had
"Assigned To" on it, which behaves exactly how it does on a Task Form. When I looked at the "All Fields" tab and look under "All Task Fields" there is a property called "Assigned To". I think it's part of the recipient object though. I don't think it's the Owner property that will help. I'm not that familiar with the Delegator one though. I'm not sure how to use "{00062003-0000-0000-C000-000000000046}" - I'll have to do some research on it. |
Set "Assigned To" for a Contact Item
That namespace I mentioned ("{00062003-0000-0000-C000-000000000046}") is
what's used by Outlook for task properties that aren't standard on a task item (named properties). That 0x0E04001F property tag you originally specified would correcpond to PR_DISPLAY_TO_W, the Unicode equivalent to the To property. That might work as an assigned to property in some cases but it wouldn't be foolproof. The properties I mentioned would be a better choice. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Koops" wrote in message ... I was given a custom form which is a contact item, and it had "Assigned To" on it, which behaves exactly how it does on a Task Form. When I looked at the "All Fields" tab and look under "All Task Fields" there is a property called "Assigned To". I think it's part of the recipient object though. I don't think it's the Owner property that will help. I'm not that familiar with the Delegator one though. I'm not sure how to use "{00062003-0000-0000-C000-000000000046}" - I'll have to do some research on it. |
Set "Assigned To" for a Contact Item
I'm not sure how to use the {00062003-0000-0000-C00-000000000046} is
it that I just change my Schema to it and away I go? Thanks, |
Set "Assigned To" for a Contact Item
No, you would use it in conjunction with other text to form a complete DASL
property tag. On its own it wouldn't mean anything. For example, you can access the DelegationState PT_LONG (32 bit long) property using this string (not a URL): "http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/812A0003" Without knowing the property you want to access the namespace (that Guid string) is useless. And if you want to access a property such as Owner, Ownership, DelegationState or Delegator that are exposed in the object model you just use the property name and don't need to fool around with MAPI or DASL property tags. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Koops" wrote in message ... I'm not sure how to use the {00062003-0000-0000-C00-000000000046} is it that I just change my Schema to it and away I go? Thanks, |
All times are GMT +1. The time now is 12:28 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-2006 OutlookBanter.com