Non working code, sorry.
function getAllContacts() {
var contacts = ContactsApp.getAllContacts();
for (var i = 0; i < contacts.lengh; i++)
{
var contact = [];
contact.push(contacts[i].getFullName());
contact.push(contacts[i].getPrimaryEmail());
contact.push(contacts[i].getEmailAddresses());
contact.push(contacts[i].getHomeAddress());
contact.push(contacts[i].getWorkAddress());
contact.push(contacts[i].getPager());
contact.push(contacts[i].getHomeFax());
contact.push(contacts[i].getWorkFax());
contact.push(contacts[i].getHomePhone());
contact.push(contacts[i].getWorkPhone());
contact.push(contacts[i].getMobilePhone());
contact.push(contacts[i].getNotes());
contact.push(contacts[i].getUserDefinedField());
contact.push(contacts[i].getUserDefinedFields());
range = SpreadsheetApp.getActiveSheet().getRange((3+i),1,1,contact.length);
range.setValues([contact]);
}
}
No comments:
Post a Comment