変数 = ContactsApp.getContactGroups();
変数 = ContactsApp.getContactGroup( 名前 );
変数 = ContactsApp.getContactGroupById( ID );
変数 = ContactsApp.getAllContacts();
変数 = ContactsApp.getContactGroup( グループ );
変数 = ContactsApp.getContactGroupById( グループID );
変数 = ContactsApp.getContact( メールアドレス );
変数 = ContactsApp.getContactById( ID );
変数 = ContactsApp.getContactsByName( 名前 );
変数 = ContactsApp.getContactsByName( 名前, フィールド );
変数 = ContactsApp.getContactsByEmailAddress( メールアドレス );
変数 = ContactsApp.getContactsByEmailAddress( メールアドレス, アドレスの種類 );
変数 = ContactsApp.getContactsByAddress( 住所 );
変数 = ContactsApp.getContactsByAddress( 住所, 住所の種類 );
変数 = ContactsApp.getContactsByPhone( 電話番号 );
変数 = ContactsApp.getContactsByPhone( 電話番号, 電話番号の種類 );
変数 = ContactsApp.getContactsByUrl( URL );
変数 = ContactsApp.getContactsByUrl( URL, URLの種類 );
変数 = ContactsApp.getContactsByIM( IM );
変数 = ContactsApp.getContactsByIM( IM, IMの種類 );
変数 = ContactsApp.getContactsByDate( 月, 日, 日付の種類 );
変数 = ContactsApp.getContactsByDate( 月, 日, 年, 日付の種類 );
変数 = ContactsApp.getContactsByNotes( ノート );
変数 = ContactsApp.getContactsByCompany( 会社 );
変数 = ContactsApp.getContactsByJobTitle( 役職 );
※リストが表示されない場合
AddBlockなどの広告ブロックツールがONになっているとリストなどが表示されない場合があります。これらのツールをOFFにしてみてください。
※全Group名と全Contact名をアクティブシートに書き出す function getContacts(){ var sheet = SpreadsheetApp.getActiveSheet(); var contacts = ContactsApp.getAllContacts(); var groups = ContactsApp.getContactGroups(); for(var i = 0;i < groups.length;i++){ sheet.getRange(i + 1, 1).setValue(groups[i].getName()); } for(var i = 0;i < contacts.length;i++){ sheet.getRange(i + 1, 3).setValue(contacts[i].getFullName()); } } ※入力したアドレスのContactの名前をログに書き出す function getContact(){ var str = Browser.inputBox("メールアドレスを入力:"); var contact = ContactsApp.getContact(str); if (contact != undefined){ Logger.log(contact.getFullName()); } }
<< 前へ | 次へ >> |