Created
January 24, 2014 16:42
-
-
Save locatejp/8601041 to your computer and use it in GitHub Desktop.
Selects all Google Calendars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function selectAll() { | |
var cals = CalendarApp.getAllCalendars(); //Get all of the calendars | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
ss.toast("This process takes about 2 minutes. Another notification will indicate when complete", "Process Started!", 20); | |
for ( var i = 0; i <= cals.length-1; i++ ) { //Create a loop and select each one individually | |
var tempName = cals[i]; | |
if (tempName != "Tasks" && tempName != "Choose From Dropdown" ) // FILTER UNNEEDED CALENDARS | |
{ | |
tempName.setSelected(true); | |
} | |
} | |
ss.toast("All Calendars Have Been Selected. Please refresh your calendar.", "Process Complete" ,5); | |
Browser.msgBox('Complete! Please change the calendar *Boomerang Internal Notes* to Blue, and the calendar *Charlotte* to Brick Red. Thanks!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment