Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

114
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda