Click or drag to resize

IFindContactsByName Method

Find collection of Contacts. If name ends in % then a begins with search is done. Search and retrieve contacts by their name. This will return all contacts that start with the name given as search name

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SOContacts ContactsByName(
	string Name
)

Parameters

Name
Type: SystemString
search argument (partial name)

Return Value

Type: SOContacts
SOContacts – a collection of contacts matching ‘Name’
Examples

ContactsByName

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 a name that starts with Super.

VB
Dim objSO
Dim objContact
Set objSO = CreateObject("SuperOfficeDB.Database") 
If not (objSO is nothing) Then
    objSO.login "<USERID>", "<password>"
    set objContact = objSO.Find.ContactsBYName("Super")
    set Contact = objContact.getfirst
    while not objContact.eof
        item = Contact.name & " - " & Contact.department
        msgbox item
        set contact = objContact.Getnext
    wend
Else
    MsgBox "Could not log in"
End If
Set objSO = Nothing

See Also