
Using property instead of properties.item
I have some code which sets a property type object to a
item out of the properties collection. The property is a
user defined property.
The code I use is:
========
Dim oProperty As Property
Dim oProperties As Properties
Set oProperties = oContact.Properties
Set oProperty = oProperties.Item("My Property")
If oProperties.Item("My Property").Name = oProperty.Name
Then
MsgBox "Same"
Else
MsgBox "Different"
End If
========
Depending on the property name, it sometimes
returns "Same" and sometimes returns "Different". Because
of this I've had to change all my code to use
oProperties.Item("My Property") instead of the more
efficient oProperty.
My question is, is this a bug or am I doing something
wrong?