The extended property attribute combination is invalid. I'm trying to set the label color of an appointment and I just can't get the right attribute combination. My code is: PathToExtendedFieldType label = new PathToExtendedFieldType(); Guid mapiGuid = new Guid("{00062002-0000-0000-C000-000000000046}"); label.PropertySetId = mapiGuid.ToString("D"); label.PropertyId = 0x8214; label.PropertyIdSpecified = true; label.PropertyType = MapiPropertyTypeType.String; ExtendedPropertyType labelColor = new ExtendedPropertyType(); labelColor.ExtendedFieldURI = label; labelColor.Item = "0x3"; This obviously does not work. I have tried many different variations and nothing seems to work. I used Outlook Spy and I see the MAPI property in there and the guid and the value. What am I doing wrong here. I can't believe MS made it this difficult to programatically change a label color. Thanks a lot guys! Any help would be appreciated. Cheers, ~ck
Hello, the proper value type of the 0x8214 property is integer. Have you tried that? Kind regards, Henning "CK" wrote in message news:fCnYi.1102$0Q5.1101@nlpi070.nbdc.sbc.com... > The extended property attribute combination is invalid. I'm trying to set > the label color of an appointment and I just can't get the right attribute > combination. My code is: > > PathToExtendedFieldType label = new PathToExtendedFieldType(); > Guid mapiGuid = new Guid("{00062002-0000-0000-C000-000000000046}"); > label.PropertySetId = mapiGuid.ToString("D"); > label.PropertyId = 0x8214; > label.PropertyIdSpecified = true; > label.PropertyType = MapiPropertyTypeType.String; > ExtendedPropertyType labelColor = new ExtendedPropertyType(); > labelColor.ExtendedFieldURI = label; > labelColor.Item = "0x3"; > > This obviously does not work. I have tried many different variations and > nothing seems to work. I used Outlook Spy and I see the MAPI property in > there and the guid and the value. What am I doing wrong here. I can't > believe MS made it this difficult to programatically change a label color. > Thanks a lot guys! > > Any help would be appreciated. > > Cheers, > ~ck > > > >
Yes that was it. I figured it out after I posted. It works great now. Thanks!!! >> PathToExtendedFieldType label = new PathToExtendedFieldType(); >> Guid mapiGuid = new Guid("{00062002-0000-0000-C000-000000000046}"); >> label.PropertySetId = mapiGuid.ToString("D"); >> label.PropertyId = 0x8214; >> label.PropertyIdSpecified = true; >> label.PropertyType = MapiPropertyTypeType.Integer; >> ExtendedPropertyType labelColor = new ExtendedPropertyType(); >> labelColor.ExtendedFieldURI = label; >> labelColor.Item = "3"; "Henning Krause [MVP - Exchange]" wrote in message news:eTCZSTYIIHA.5208@TK2MSFTNGP04.phx.gbl... > Hello, > > the proper value type of the 0x8214 property is integer. Have you tried > that? > > Kind regards, > Henning > > "CK" wrote in message > news:fCnYi.1102$0Q5.1101@nlpi070.nbdc.sbc.com... >> The extended property attribute combination is invalid. I'm trying to set >> the label color of an appointment and I just can't get the right >> attribute combination. My code is: >> >> PathToExtendedFieldType label = new PathToExtendedFieldType(); >> Guid mapiGuid = new Guid("{00062002-0000-0000-C000-000000000046}"); >> label.PropertySetId = mapiGuid.ToString("D"); >> label.PropertyId = 0x8214; >> label.PropertyIdSpecified = true; >> label.PropertyType = MapiPropertyTypeType.String; >> ExtendedPropertyType labelColor = new ExtendedPropertyType(); >> labelColor.ExtendedFieldURI = label; >> labelColor.Item = "0x3"; >> >> This obviously does not work. I have tried many different variations and >> nothing seems to work. I used Outlook Spy and I see the MAPI property in >> there and the guid and the value. What am I doing wrong here. I can't >> believe MS made it this difficult to programatically change a label >> color. Thanks a lot guys! >> >> Any help would be appreciated. >> >> Cheers, >> ~ck >> >> >> >> >