APPENDIX C
Automation Walkthrough
Automation Walkthrough
Two automation walkthroughs for two ecosystems. Google Workspace: names from a spreadsheet, merged into certificate templates via Apps Script. Microsoft Office: the same thing with VBA. One click, fifty certificates. Here’s how to build both.
What You Need
How It Works
The script reads participant names from a Google Sheet, creates a copy of a certificate template in Google Slides, replaces the placeholder text with each participant’s name and details, then exports each certificate as a PDF into a designated Drive folder. No external tools. No paid add-ons. Everything runs inside your existing Google Workspace.
Step by Step Guide
Step 1 | Create the participant list
Open Google Sheets. Column A: full name. Column B: designation or role (optional). Column C: date of training. One row per participant. That’s your data source.
Step 2 | Design the certificate template
Open Google Slides. Design your certificate on a single slide. Where the participant's name should go, type the placeholder . For the date, use . For the role, use . Style it however you want. This slide is your template.
Step 3 | Create the output folder
In Google Drive, create a new folder called “Certificates” (or whatever you prefer). Copy the folder ID from the URL. You’ll need it in the script.
Step 4 | Add the script
In your Google Sheet, go to Extensions > Apps Script. Delete any existing code. Paste in the script below. Update the three IDs: your template Slides ID, your Sheet ID, and your output folder ID.
Step 5 | Run it
Click Run. Authorise when prompted (first time only). Watch your Certificates folder fill up with PDFs. One per participant. Done.
The Script
Don’t want to code?
Copy the script above and paste it into ChatGPT or Claude. Say: “I want to understand what this script does, step by step. Then help me set it up.” The AI will walk you through it. For the first time in history, the tool that confuses you can also explain itself.
Troubleshooting
“Authorization required”
This is normal on the first run. Google needs your permission to access Sheets, Slides, and Drive. Click through and approve.
Wrong names or missing data?
Check your Sheet. Make sure Column A starts at row 2 (row 1 is the header). No empty rows in between.
Placeholders not replacing?
Make sure your template uses exactly , , and , curly brackets included, no extra spaces.
Need to add more fields?
Add a column to your Sheet, add a matching placeholder to your template (e.g. ), and add one more replaceAllText line to the script. Or ask an AI tool to do it for you.
Extensions: Want to email the certificates automatically? Add a GmailApp.sendEmail() call inside the loop. Want to log completions? Write back to the Sheet. The base script here is a starting point. Build on it.
The Other Automation Tool You Already Have
If you have Excel installed on your desktop, any version, there’s an automation engine already built in. It’s called VBA (Visual Basic for Applications), and it’s been there since the 1990s. Every desktop installation of Excel has it, from the oldest version in your office to the latest Microsoft 365 desktop app.
To use it, you open the Visual Basic Editor (VBE) from inside Excel. And this is where most people stop. The VBE looks like it was designed for programmers. It wasn’t designed for anyone, honestly. It just hasn’t been updated since 2003. Behind that dated interface is a five-step process: open, paste, run, done.
Here’s the thing that changes everything: you don’t need to write VBA. You describe what you want to Claude or Gemini, get the script, paste it into the VBE, and press Run. The AI writes the code. You just press the button. Same pattern as everything else in this book: AI handles the packaging, you handle the judgment.
Using Excel Online? The VBE only exists in the desktop version of Excel. If you work primarily in Excel on the web (M365 online), Microsoft offers Office Scripts instead. Office Scripts use TypeScript rather than VBA, but the concept is identical: automate repetitive tasks with a script you paste and run. The good news? AI tools write TypeScript just as easily as VBA. Tell Claude “I need this automation as an Office Script for Excel Online” and it’ll generate the right code for your environment.
Opening the VBE (Excel Desktop)
Step 1 | Enable the Developer tab
In Excel, go to File > Options > Customize Ribbon. On the right side, tick the “Developer” checkbox. Click OK. This only needs to be done once, ever.
Step 2 | Open the VBE
Click the Developer tab, then click “Visual Basic.” Or just press Alt + F11. That’s the shortcut. Memorise it and you’ll never need the Developer tab again.
Step 3 | Insert a module
In the VBE, go to Insert > Module. A blank white window appears. This is where your code goes. That’s it. That’s the scary part. A blank white window.
Step 4 | Paste and run
Paste the code (from the AI or from below). Press the green Play button, or hit F5. Watch it work.
Step 5 | Save as .xlsm
When saving, choose “Excel Macro-Enabled Workbook (.xlsm)” instead of the normal .xlsx. This preserves the code inside the file so you can reuse it.
Example: Auto-Format a Monthly Report
Every month, you receive raw data in a spreadsheet. Every month, you spend an hour formatting it: bold headers, column widths, borders, number formats, freeze panes. Every month, the same ritual. This macro does it in two seconds.
This is a starter. Your monthly report has its own quirks: specific columns, specific formatting, specific rules. Open Claude, paste this script, and say: “I have a monthly report where Column A is department names, Column D is budget figures in RM, and I need conditional formatting where anything over RM50,000 is highlighted in yellow. Modify this script for me.” Claude will rewrite it. You paste, you run, you’re done.
Example: Generate Certificates from Excel
The same certificate automation as the Apps Script version above, but for Microsoft Office. This macro runs from inside Excel desktop and controls Word in the background: it reads names from your spreadsheet, opens a Word certificate template, replaces the placeholders, and exports each one as a PDF. Both Excel and Word need to be installed on the same machine.
This is a starter. Your monthly report has its own quirks: specific columns, specific formatting, specific rules. Open Claude, paste this script, and say: “I have a monthly report where Column A is department names, Column D is budget figures in RM, and I need conditional formatting where anything over RM50,000 is highlighted in yellow. Modify this script for me.” Claude will rewrite it. You paste, you run, you’re done.
VBA Troubleshooting
“Macros have been disabled”
This means your security settings are blocking the script. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. Select “Disable all macros with notification,” so Excel asks you each time rather than silently blocking everything.
“Run-time error 429: ActiveX component can’t create object”
This means Word isn’t installed or isn’t accessible. The certificate script needs both Excel and Word on the same machine.
File path errors?
Make sure the output folder exists before running. VBA won’t create folders for you. And use full paths with backslashes, not forward slashes.
Need to tweak something but don’t understand the code?
Copy the entire script into Claude or Gemini. Say: “Explain what each section does, then help me change [specific thing].” You don’t need to learn VBA. You need to learn how to ask.
VBA hasn’t changed in twenty years.
That’s actually good news. Every tutorial, every StackOverflow answer, every AI-generated script from the last two decades still works. If you’re on desktop Excel, VBA is the most stable automation platform you’ll ever use. If you’re on Excel Online, Office Scripts is newer but just as capable for task automation, and AI tools generate TypeScript just as fluently. Either way, describe what you need, paste the code, press run.