Userproperties.add (complains about being read only)???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.

Can somebody tell me why the following code does not work?

----
For Each l_item In Dokumente_ordner.Items
l_item.Userproperties.Add "myAnsprechpartner", olText
l_item.UserProperties.Find("myAnsprechpartner").Value = "test"
Next
----

It complains that "Tis property is read only." in line 2 (where i want to
add a Userproperty)

THX!!!

best regards,

Fabian Werner
anyWARE AG,
Germany
 
Same problem here:

attachItem.UserProperties.Add("ItemID", olText, True, olText) = itemID
^^ after this statement Err.Description == "The operation failed."

Tried referencing:
Set a = attachItem.UserProperties.Add("ItemID", olText, True, olText)
a.Value = itemID
Pops out with "This property is read-only"..

? TypeName(attachItem)
DocumentItem
' Born like this:
Set attachItem = folderAdmin.items.Add("IPM.Document")
? TypeName(folderAdmin)
MAPIFolder

? TypeName(itemID)
String

What-to-do?..

Thanks in advance!
 
It is not possible to add custom properties to an Outlook DocumentItem.
 
The newsgroup interface you are using apparently does not quote earlier
messages in the thread, making your latest message so short on detail that
you risk not getting the answer you're looking for. Please take the time to
quote the original message.
 
It is not possible to add custom properties to an Outlook DocumentItem.

Neither via CDO?

The newsgroup interface you are using apparently does not quote earlier
messages in the thread, making your latest message so short on detail that
you risk not getting the answer you're looking for. Please take the time to
 
I've never tried it, but I don't think it will work. The DocumentItem simply doesn't support custom Outlook properties. Word and Excel documents, of course, do support custom properties added through their own interfaces.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top