harmmeijer
Programmer
I have a user difigned field called mytextfile in a contact.
Now I want to use the filter, lets say the mytextfile cannot be null.
Here is the code (it is vb because the asp will look almost the same) so far but I do not know how to do ot nor can I find a good example on the net:
Private Sub Form_Load()
Dim objSession As New MAPI.Session
Dim objFolder As MAPI.Folder
Dim objContacts As MAPI.Messages
Dim objContact As MAPI.Message
Dim objFilter As MAPI.MessageFilter
strProfileInfo = "server" & vbLf & "mailbox"
objSession.Logon "", "", False, True, 0, True, strProfileInfo
Set objFolder = objSession.GetDefaultFolder(CdoDefaultFolderContacts)
Set objContacts = objFolder.Messages
Set objFilter = objContacts.Filter
' both the statements below don't work
' objFilter.Fields.Add objContacts(1).Fields("mytextfile"
, "hi"
' objFilter.Fields(45) = "hi"
End Sub
Now I want to use the filter, lets say the mytextfile cannot be null.
Here is the code (it is vb because the asp will look almost the same) so far but I do not know how to do ot nor can I find a good example on the net:
Private Sub Form_Load()
Dim objSession As New MAPI.Session
Dim objFolder As MAPI.Folder
Dim objContacts As MAPI.Messages
Dim objContact As MAPI.Message
Dim objFilter As MAPI.MessageFilter
strProfileInfo = "server" & vbLf & "mailbox"
objSession.Logon "", "", False, True, 0, True, strProfileInfo
Set objFolder = objSession.GetDefaultFolder(CdoDefaultFolderContacts)
Set objContacts = objFolder.Messages
Set objFilter = objContacts.Filter
' both the statements below don't work
' objFilter.Fields.Add objContacts(1).Fields("mytextfile"
' objFilter.Fields(45) = "hi"
End Sub