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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Set "Assigned To" for a Contact Item



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 9th 09, 08:13 PM posted to microsoft.public.outlook.program_addins
Koops
external usenet poster
 
Posts: 3
Default 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
Ads
  #2  
Old October 9th 09, 08:46 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


  #3  
Old October 13th 09, 07:11 PM posted to microsoft.public.outlook.program_addins
Koops
external usenet poster
 
Posts: 3
Default 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.
  #4  
Old October 13th 09, 07:51 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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.


  #5  
Old October 13th 09, 09:38 PM posted to microsoft.public.outlook.program_addins
Koops
external usenet poster
 
Posts: 3
Default 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,
  #6  
Old October 13th 09, 10:30 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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,


 




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
"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


All times are GMT +1. The time now is 08:34 AM.


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.