在Google Apps脚本中为Google文档创建自定义按钮

时间:2019-07-10 19:44:01

标签: google-apps-script

我正在尝试找到一种方法来在Google Apps脚本中为ButtonSet创建自己的自定义文本。我不想使用YES,NO,OK等默认选项之一。我希望按钮显示为:“ Today”和“ Tomorrow”。到目前为止,这是我尝试过的方法,但是我没有运气...对如何实现此目标有任何想法吗?谢谢!

// Create custom button text for Today and Tomorrow
  var TodayButton = CardService.newTextButton()
  .setText("Today");
  var TomorrowButton = CardService.newTextButton()
  .setText("Tomorrow");
  var DayButtonSet = CardService.newButtonSet()
  .addButton(TodayButton)
  .addButton(TomorrowButton);

  var responseWeatherImpactsDate = ui.alert('Do you want the first day of the Weather Impacts table to be today or tomorrow?', DayButtonSet);

0 个答案:

没有答案