/ Forums / Advansys Formativ / Creating Solutions with Formativ / I’d like to uppdate addresses from a file into a personal address book. / Reply To: I’d like to uppdate addresses from a file into a personal address book.
September 10, 2007 at 4:40 pm
#7869
Please see the AddressBookEntry object in the Object API for the available properties of an address book entry. You need to iterate through the fields collection to access available fields (i.e. comments, address, personal address, etc).
The sample code below update the email address and comments of first entry in the address book.
dim oField
dim oAddressBook
set oAddressBook = nothing
set oAddressBook = groupwise.account.addressbooks.item("Test Book")
set oEntry = oAddressBook.AddressBookEntries.item(1)
' Before update
msgbox oEntry.displayname & vbcrlf & oEntry.emailaddress
oEntry.emailaddress = "test@hotmail.com"
' After update
msgbox oEntry.displayname & vbcrlf & oEntry.emailaddress
' Fields collection
for each oField in oEntry.fields
if (lcase(oField.name) = "comments") then
oField.value = "Updated comments1"
end if
next
set oField = nothing
set oAddressBook = nothing
You can also view the “Formativ Developers Guide” for some sample code.
Regards,
Advansys Support