Guest_imported
New member
- Jan 1, 1970
- 0
Can someone tell me what's wrong with this function!
I really don't see it.
I get an error on the line " Set oField = oRecip.AddressEntry.Fields(CdoPR_EMS_AB_PROXY_ADDRESSES)"
Can anyone please help me!
Function IsInRecipients(Data, CheckParam)
Dim i
Dim oRecip
Dim oField
Dim v
Dim str
For i = 1 To oMsg.Recipients.Count
Set oRecip = oMsg.Recipients.Item(i)
If CheckParam = 1 Then
If LCase(oRecip.Name) = LCase(Data) Then
WriteDebugString "Name matches"
Set oRecip = Nothing
IsInRecipients = True
Exit Function
End If
ElseIf CheckParam = 2 Then
Set oField = oRecip.AddressEntry.Fields(CdoPR_EMS_AB_PROXY_ADDRESSES)
For Each v In oField.Value
If LCase(Right(v, Len(v)-InStr(v,":"
)) = LCase(Data) Then
WriteDebugString "E-Mail address matches"
Set oField = Nothing
Set oRecip = Nothing
IsInRecipients = True
Exit Function
End If
Next
Set oField = Nothing
End If
Set oRecip = Nothing
Next
IsInRecipients = False
End Function
I really don't see it.
I get an error on the line " Set oField = oRecip.AddressEntry.Fields(CdoPR_EMS_AB_PROXY_ADDRESSES)"
Can anyone please help me!
Function IsInRecipients(Data, CheckParam)
Dim i
Dim oRecip
Dim oField
Dim v
Dim str
For i = 1 To oMsg.Recipients.Count
Set oRecip = oMsg.Recipients.Item(i)
If CheckParam = 1 Then
If LCase(oRecip.Name) = LCase(Data) Then
WriteDebugString "Name matches"
Set oRecip = Nothing
IsInRecipients = True
Exit Function
End If
ElseIf CheckParam = 2 Then
Set oField = oRecip.AddressEntry.Fields(CdoPR_EMS_AB_PROXY_ADDRESSES)
For Each v In oField.Value
If LCase(Right(v, Len(v)-InStr(v,":"
WriteDebugString "E-Mail address matches"
Set oField = Nothing
Set oRecip = Nothing
IsInRecipients = True
Exit Function
End If
Next
Set oField = Nothing
End If
Set oRecip = Nothing
Next
IsInRecipients = False
End Function