Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
How add action button to google-doc?

I want to add button or another widget with click action to my Google Document with Apps Scripts; How will i can do it?

function addButton()
{
  var body = DocumentApp.getActiveDocument().getBody();
  // code for add button to body.
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Create a menu

function onOpen() {
   menu();
}

function menu() {
  DocumentApp.getUi().createMenu('MyMenu')
  .addItem('Function Descript', 'functionName')
  .addToUi();  
}

function functionName() {
  //a function that does nothing
}

Your best bet is to learn how to do this on your own so that you don't have to return here everytime you require a modification.

If you wish to add buttons I would recommend placing them on a sidebar with html. That will take a little more effort but in the long run it will be worth learning how to build and reuse the html file.

Reference:

  • Custom Menus in Google Workspace
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!