This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Saves the current document in Google Docs as PDF to the same folder. | |
// Code from https://stackoverflow.com/questions/28312992/convert-google-doc-to-pdf-using-google-script-editior | |
// Just added onOpen() to add the script to the menubar. | |
function onOpen() { | |
var ui = DocumentApp.getUi(); | |
// Or DocumentApp or FormApp. | |
ui.createMenu('My scripts') | |
.addItem('Convert to PDF', 'convertPDF') | |
.addToUi(); |