/ Forums / Advansys Formativ / Creating Solutions with Formativ / Address Book Rights and Multiple Addresses / Reply To: Address Book Rights and Multiple Addresses

#7247
Support 1a
Participant

    This error means the Object API hasn’t returned an object to you. In this case, the Object API doesn’t return an AddressBookRights collection unless the address book has actually been shared with someone. You need to check if the AddressBookRights object is ‘nothing’ before accessing it.

    Here’s some example code:

    dim oBook
    dim oRights
     
    set oBook = groupwise.account.addressbooks.item("Test")
     
    msgbox oBook.Name
     
    set oRights = nothing
    set oRights = oBook.AddressBookRights
     
    if oRights is nothing then
      msgbox "No object"
    else
      msgbox "object"
    end if
    
    set oRights = nothing
    set oBook = nothing

    I suspect the same issue may be behind the missing address book problem you encountered. If the book has been deleted (or is otherwise unavaible), the Object API will return an empty object. You need to check this before attempting to access the returned objects properties.

    I hope this helps.

    Advansys Support