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

195
Views
Create Custom Menu to Apply Template to Google Docs on my Drive

Looking for a way to create a custom menu on Google Apps Script available across ALL my Google Docs, not just the one for which I created the script. The function itself works properly, it is the setup/trigger rather that is giving me trouble. Not sure if this is possible, given I'm seeing info saying Custom Menus must be bound to a particular document (rather than the whole object), so open to other suggestions too - the goal is to be able to apply a specific template to a Google Doc when I'd like (they will always be created in the same folder).

function OnOpen(e) {
  DocumentApp.getUi().createMenu('Template Options')
      .addItem('Apply Customer Note Template', 'menuItem1')
      .addToUi()
}

function menuItem1() {
  var body = DocumentApp.getActiveDocument().getBody();


  var OppTitle = body.appendParagraph("Opportunity Name");
  OppTitle.setHeading(DocumentApp.ParagraphHeading.TITLE);
  OppTitle.setAlignment(DocumentApp.HorizontalAlignment.CENTER);

...

  DocumentApp.getUi().alert('Customer Template applied.');
  
  }

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes, you can do that, it is called Editor Addons. Just think about all the apps that exist in the Marketplace, they also create the app or function once, then package it for the Google Marketplace where any number of users can install the package and use it across all Spreadsheets.

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!