If mhMailItem.UserProperties.Find(tUserPropName, True) IsNot Nothing
Then
That's what I meant by the optional Custom property. It's listed in the
Object Browser for UserProperties.Find().
I'd also start by verifying each object instead of using dot operators there
to help localize the problem. For example instead of:
If mhMailItem.UserProperties.Find(tUserPropName, True) IsNot Nothing
Then
use something like this:
If (mhMailItem IsNot Nothing) Then
Dim colProps As Outlook.UserProperties = mhMailItem
If (colProps IsNot Nothing) Then
' now use colProps with the Find method
That way you can tell where things are failing exactly.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Hahn, Thomas" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The exception is fired by trying to find my property
>
> If mhMailItem.UserProperties.Find(tUserPropName) IsNot Nothing Then
>
> Sorry
> what do you mean with "true for the optional Custom argument to
> UserProperties.Find()"?
>
> Thomas