IFindContactsByEmail Method |
find collection of Contacts using e-mail addresses
Search and retrieve contacts by their email address. This will return all contacts that have an email address like the email given as search string. Does not accept partial address, but wildcards does work
Namespace:
SuperOffice.COM.SuperOfficeDB
Assembly:
SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
SyntaxSOContacts ContactsByEmail(
string Email
)
Function ContactsByEmail (
Email As String
) As SOContacts
Dim instance As IFind
Dim Email As String
Dim returnValue As SOContacts
returnValue = instance.ContactsByEmail(Email)
SOContacts^ ContactsByEmail(
[InAttribute] String^ Email
)
Parameters
- Email
- Type: SystemString
search argument (email address)
Return Value
Type:
SOContactsSOContacts a collection of contacts matching 'Email'.
ExamplesContactsByEmail
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information. The source code below logs on to the database, and search and retrieves all contacts with an email address like ‘Info@SuperOffice.com’
dim objso
set objso = CreateObject("superofficedb.database")
If not (objSO is nothing) Then
objso.login "<USERID>", "<password>"
set objcontact = objso.find.contactsbyemail("info@superoffice.com")
set contact = objcontact.getfirst
while not objcontact.eof
item = contact.name & " - " & contact.department
msgbox item
set contact = objcontact.getnext
wend
msgbox "thats all..."
else
msgbox "could not log in"
end if
set objso = nothing
See Also