#7442
MA
Participant

    quote:


    It works OK if the Home Address field in the address book contains a value, but throws an “Index out of range” error if it is empty.


    Address book entry fields collection will not contains the field if the value is empty. You need to place an error handling to check the field existance prior to access the value.

    dim oBook
    dim oEntry
    dim oField

    set oBook = groupwise.account.addressbooks.item(“Test”)

    set oEntry = oBook.addressbookentries.item(1)

    on error resume next
    set oField = oEntry.Fields.Item(“Home Address”, fgwString)

    if not oField is nothing then
    msgbox oField.Name & vbcrlf & oField.Value
    end if

    set oEntry = nothing
    set oBook = nothing

    Thanks
    MA