Set "Assigned To" for a Contact Item

  • Thread starter Thread starter Koops
  • Start date Start date
Status
Not open for further replies.
K

Koops

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

"Koops" <erickoop@gmail.com> wrote in message

news:ce568003-1e0d-4e68-9b7a-34e8a63ddc76@u16g2000pru.googlegroups.com...
> 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
 
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.
 
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.

"Koops" <erickoop@gmail.com> wrote in message

news:da060fae-e99a-4a43-86a7-dbd1cede1ece@2g2000prl.googlegroups.com...
> 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.
 
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,
 
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.

"Koops" <erickoop@gmail.com> wrote in message

news:0f8d0050-4126-4f9c-9dac-3849533c35c4@m3g2000pri.googlegroups.com...
> 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,
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
efire9207 Set all properties Using Outlook 1
T How to set Default FONT for Email composing ? Using Outlook 0
J Set calendar default to 'none' (policy) Exchange Server Administration 3
U When opening shared Calendar "The set of folders cannot be opened" Using Outlook 0
L Help: set flag for sent mail to check if received an answer Outlook VBA and Custom Forms 2
D VBA - unable to set rule condition 'on this computer only' Outlook VBA and Custom Forms 5
Witzker Set Cursor & Focus from any field to the body of a user Contact form in OL 2019 Outlook VBA and Custom Forms 1
justicefriends How to set a flag to follow up using VBA - for addressee in TO field Outlook VBA and Custom Forms 11
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
O Cannot expand the folder. The set of folders cannot be opened. You do not have permission to log on. Using Outlook 1
e_a_g_l_e_p_i Outlook 2010 How to set default email address for website links Using Outlook 3
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
e_a_g_l_e_p_i Is it possible it set the fonts used to read incoming mail Using Outlook 25
bmtjedi Set objApp = Application Not Working in O365-32bit Using Outlook 1
F how do i set a reminder in onenote 2010 Using Outlook 8
glnz How set up new IMAP on Outlook-Office 365 and merge in pst from Outlook 2003 for same two email accounts? Using Outlook 5
ChrisK2 Send email to advertise@slipstick.com fails: "The group advertising isn't set up to receive messages from..." Using Outlook 3
S How to set up button in ribbon for individual Quick Steps Using Outlook 1
J Set Timer/Countdown on Emails? Outlook VBA and Custom Forms 3
N How to set automatically the default or user defined Quickstyle Templates by Answer in Outlook Using Outlook 1
Victor_50 Set all subfolders to not autoarchive Outlook VBA and Custom Forms 11
Z Script to set account? Using Outlook 0
4 Macro to set the category of Deleted Item? Outlook VBA and Custom Forms 2
J What is the best EntryID format to set on MS Access table Outlook VBA and Custom Forms 3
e_a_g_l_e_p_i Can you set reminder to specific times? Using Outlook 7
CWM030 I do not see a way to set the personal archive folder Exchange Server Administration 2
Witzker Macro to set contact reminder to next day 9:00 Outlook VBA and Custom Forms 45
O Set columns for all (sub)folders Using Outlook 8
S Appointment-Cannot set Categories because ConversationID is not set Outlook VBA and Custom Forms 1
Fozzie Bear Correct Method to set up Outlook.com accounts as Exchange Using Outlook.com accounts in Outlook 7
e_a_g_l_e_p_i How to set fonts for emails in all folders in Outlook Using Outlook 1
F Set (flagged) reminder for next business day Using Outlook 4
L how to set downloaded cached emails Using Outlook 5
J Object Variable or With Block Not Set Error in Outlook 2016 and not Outlook 2013 Outlook VBA and Custom Forms 3
S set a flag task date as the next weekday Outlook VBA and Custom Forms 4
C Set reminder / appointment by right clicking email Using Outlook 1
Diane Poremsky Set Another Data File as Default When Using an Exchange Account Using Outlook 0
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
L set task reminder date to same as start date (without affecting due date) Using Outlook 0
S how to set user properties to a newly created appointment Outlook VBA and Custom Forms 12
C Outlook VBA to set current account Outlook VBA and Custom Forms 1
Diane Poremsky Add Attachments and Set Email Fields During a Mail Merge Using Outlook 0
O How to set subject line in replies using VBA Outlook VBA and Custom Forms 1
A Custom form not showing when recurrence is set for a meeting Using Outlook 0
M Exchange 2013 On premise set MessageRateLimit for User has no effect. Exchange Server Administration 0
A Block user to send emails to specific set of email ids Using Outlook 1
D Outlook 2007 e-mail header- How to set font & font size in received message headers ? Using Outlook 2
Diane Poremsky Exchange account set-up missing in Outlook 2016 Using Outlook 0
M To set the storage folder for an outgoing Outlook message Outlook VBA and Custom Forms 8
E Meeting reminders are set for the recipient Exchange Server Administration 9

Similar threads

Back
Top