Class DocumentTriggerBuilder

DocumentTriggerBuilder

A builder for document triggers.

Methods

MethodReturn typeBrief description
create()TriggerCreates and returns the new trigger.
onOpen()DocumentTriggerBuilderSpecifies a trigger that will fire when the document is opened.

Detailed documentation

create()

Creates and returns the new trigger.

Return

Trigger — The new trigger.


onOpen()

Specifies a trigger that will fire when the document is opened.

var document = DocumentApp.getActiveDocument();
ScriptApp.newTrigger('myFunction')
  .forDocument(document)
  .onOpen()
  .create();

Return

DocumentTriggerBuilder — This DocumentTriggerBuilder, for chaining.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.