If you've ever had to go through and fix up formatting on a large Google Doc, you'll know what a pain it can be. Here's how to automate it.
In this example, I wanted a parameter driven solution that searched through a document and set various attributes of all tables with just 1 cell in them - I use these to publish source code.
Additionally, the formats had to be slightly different depending on whether the code language was VBA or Apps Script.
and VBA like this
It's pretty straightforward - simply set up the attributes that need to be set, the value to change them to, and which type of table (in my case I assigned the types VBA and JS) to apply the changes to. Note this example is specific for 1 cell tables, but that can me modified with a small adaptation.
For more like this, see Google Apps Scripts snippets. Why not join our forum, follow the blog or follow me on twitter to ensure you get updates when they are available.
You want to learn Google Apps Script?
Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Google Apps Scripts snippets >