![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
Ads |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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. |
#4
|
|||
|
|||
![]()
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. |
#5
|
|||
|
|||
![]()
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, |
#6
|
|||
|
|||
![]()
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, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Cannot update the appointment because the corresponding item in the folder you syncronized does not match this item" | Stephen Corliss | Outlook - General Queries | 1 | June 26th 08 12:29 AM |
Opening *.PST file: "Can't open this item. Outlook blocked access to this potentially unsafe item." | R2D2 | Outlook - General Queries | 1 | September 16th 07 08:14 AM |
"categories" does not display in a new contact item | WHW | Outlook - Using Contacts | 5 | October 27th 06 01:55 PM |
If the control has a field assigned, the code "_click()" doesn't w | Arturo | Outlook - Using Forms | 1 | October 18th 06 01:24 PM |
I do not have "Encoding" item in my "View" menu of Outlook 2003? | Baher | Outlook - Installation | 0 | June 20th 06 09:35 AM |