AddressBook.Add
From Real Software Documentation
Method
| This method is only available on the OS X platform. For cross-platform development, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this method on an incompatible platform. |
AddressBook.Add ( Record as AddressBookRecord )
Adds the record to the Address Book.
Example
The following example adds a new contact to the address book.
dim book as New AddressBook
dim myContact as AddressBookContact
book=System.AddressBook
myContact = New AddressBookContact
myContact.FirstName="Xena"
myContact.LastName="Smith"
myContact.CompanyName="Xanadu"
myContact.JobTitle="Free Lance"
book.add myContact
if book.HasUnsavedChanges then
if book.save then
MsgBox "The AddressBook was saved!"
end if
Else
MsgBox "There were no unsaved changes!"
end if
dim myContact as AddressBookContact
book=System.AddressBook
myContact = New AddressBookContact
myContact.FirstName="Xena"
myContact.LastName="Smith"
myContact.CompanyName="Xanadu"
myContact.JobTitle="Free Lance"
book.add myContact
if book.HasUnsavedChanges then
if book.save then
MsgBox "The AddressBook was saved!"
end if
Else
MsgBox "There were no unsaved changes!"
end if
