Google Apps Script that selects all files in a specified Google Drive folder and lists their details

Steps to Implement: Code: function listFilesInFolder() { const folderId = “YOUR_FOLDER_ID”; // Replace with your Folder ID const folder = DriveApp.getFolderById(folderId); const files = folder.getFiles(); const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); // Clear existing content in the sheet sheet.clear(); // Add headers sheet.appendRow([“File Name”, “File ID”, “File Path”]); while (files.hasNext()) { const file = files.next(); const fileName … Read more

Google Apps Script that will split your Google Doc into separate documents based on Heading 1

Below is a Google Apps Script that will split your Google Doc into separate documents based on Heading 1 (H1) tags, using the H1 text as the new document titles. The new documents will be saved in a folder within your Google Drive. Script Code: function splitDocByHeading() { var doc = DocumentApp.getActiveDocument(); var body = … Read more

Automate Formatting in Google Docs with Google Apps Script

If you’ve ever found yourself manually converting single-item lists into headings in Google Docs, you’ll appreciate how much time automation can save. With Google Apps Script, you can create a script to identify single-item lists with specific font sizes, remove their list formatting, and convert them into regular headings. This post introduces a powerful function, … Read more

Script to Bold Specific Words and Phrases in Google Docs

This script identifies specific words or phrases (e.g., Example:, Code Snippet:, Instructions:, Solution:) that constitute the entire paragraph or element in a Google Docs document and converts them to bold text. The Script function boldSpecificPhrases() { const doc = DocumentApp.getActiveDocument(); // Access the active Google Doc const body = doc.getBody(); // Get the document’s body … Read more

Automate Text Styling in Google Docs: Bold Questions with Google Apps Script

When working on documents such as quizzes, FAQs, or study guides, it’s common to have questions labeled with a specific format, like “Question 1”, “Question 2”, etc. Manually bolding these question labels can be tedious, especially in lengthy documents. But with Google Apps Script, you can automate this task effortlessly! In this post, we’ll create … Read more

Automatically Convert Example References to H3 Headings in Google Docs Using Apps Script

When working on structured documents, especially educational materials or guides, it’s common to have sections labeled with examples (e.g., Example 1:, Example 2:). Formatting these sections manually as headings can be time-consuming. With Google Apps Script, you can automate this task! In this blog post, we’ll create a script to identify all elements starting with … Read more

Automatically Format Numbered Elements as Headings in Google Docs Using Apps Script

Formatting documents in Google Docs can be tedious, especially when dealing with consistent patterns like numbered lists or structured data. If you’ve ever needed to transform all lines, start with a number and then add a period (e.g., 1., 2., etc.) into properly formatted headings, this blog post is for you. Using Google Apps Script, … Read more

Automate Line Removal in Google Docs with Google Apps Script

Managing text-heavy documents often requires tedious manual edits, especially when dealing with recurring unwanted lines. If you’ve repeatedly deleted lines starting with a specific phrase, it’s time to automate the process! With Google Apps Script, you can streamline this task in Google Docs and save valuable time. In this blog post, we’ll walk you through … Read more

Google Apps Script for Google Slides: Comprehensive Guide

Google Apps Script for Google Slides: Comprehensive Guide Google Apps Script for Google Slides allows you to automate and customize presentations. This guide covers the basics, key methods, and advanced examples, with exercises and multiple-choice questions to help you master Google Slides automation. What is Google Apps Script for Slides? Google Apps Script enables you … Read more

The Guide to Google Apps Script

Welcome to your comprehensive guide on Google Apps Script! Whether you’re a beginner or looking to deepen your understanding, this guide will provide you with everything you need to get started, along with examples, quizzes, and coding exercises to reinforce your learning. 1. Introduction to Google Apps Script What is Google Apps Script? Google Apps … Read more