> - I've used MailItem.ItemProperties.Add() instead of
> MailItem.UserProperties.Add(). What is the difference? (both works and
> prints)
You can use either to add a custom property. It should make no difference.
> - Now I've got another problem. When I add a property with the name
> "Gesendet" and type olText using ItemProperties I get the run-time error
[quoted text clipped - 6 lines]
> collection is empty before this call. And the ItemProperties collection
> contains 81 entries, but none with this name.
That suggests that the field already exists in the parent folder of the item to which you're adding the properties with the other name. Did you look there? Did you try setting the third-parameter of the Add method to False?
> The name "Gesendet" is german for "Sent", but I've used other property names
> like "Von" (german for "From") etc. without problems. And I'm using an
> english Outlook, an english Exchange server and an english Windows Server
> 2003. What could be the problem here? I don't understand why there should be
> existing properties in a new empty message.
The existing properties very likely are not those in the item. Adding a new property to an item by default also adds it to the parent folder of the item. If you added Gesendet earlier as a date/time property, you can't add it again as a text property.
Also, the way Outlook handles localized names for built-in fields is a very poorly documented area. That could be a factor as well.

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
>
> Eric