IFindPersonsByEmail Method |
find collection of Persons using e-mail addresses
Search and retrieve persons by their email address. This will return all persons 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
SyntaxSOPersons PersonsByEmail(
string Email
)
Function PersonsByEmail (
Email As String
) As SOPersons
Dim instance As IFind
Dim Email As String
Dim returnValue As SOPersons
returnValue = instance.PersonsByEmail(Email)
SOPersons^ PersonsByEmail(
[InAttribute] String^ Email
)
Parameters
- Email
- Type: SystemString
search argument (email address)
Return Value
Type:
SOPersonsSOContacts a collection of persons matching 'Email'.
ExamplesPersonsByEmail
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 persons with an email address like 'sdk@SuperOffice.com'.
dim objso
set objso = CreateObject("superofficedb.database")
If not (objSO is nothing) Then
objso.login "<USERID>", "<password>"
set objperson = objso.find.personsbyemail("sdk@superoffice.com")
set person = objperson.getfirst
while not objperson.eof
item = person.firstname & " " & person.lastname
msgbox item
set person = objperson.getnext
wend
msgbox "thats all..."
else
msgbox "could not log in"
end if
set objso = nothing
See Also