Combining pre-written chunks of text in Google Docs
July 23, 2019 2:37 PM   Subscribe

I’m about to work on a handbook style document in Google Docs that will have instructions for handling a variety of similar situations. The handbook will cover something like 25 different situations, but there are probably only 6 or 7 unique paragraphs of instructions that just need to be mixed and matched appropriately. How do I write each paragraph only once and then call it when needed?
posted by ocherdraco to Computers & Internet (8 answers total) 2 users marked this as a favorite
 
Will the paragraphs themselves change over time such that you want to update them in one place and have the updates appear everywhere? Or once you finish writing this document, will they be pretty much set and not amended or only amended to deal with complications specific to a subset of scenarios?
posted by jacquilynne at 2:53 PM on July 23, 2019


I think Google Sheets + Google Docs will be able to do this for you.
1. Create a spreadsheet with one tab for the base paragraphs, and a separate tab for the situations (or if you like, a separate tab for each separate situation).
2. In the base paragraphs tab, put each paragraph into its own cell.
3. Use Named Ranges to give each base paragraph an easily called name
4. Build out your situations by calling each paragraph you need by using the named ranges in sequential cells (the formula is simple -- just "=NamedRange1")
5. Then, copy the spreadsheet cells and paste them into a Google Doc for your final formatting.
5a. If you need to be able to dynamically update the base paragraphs in future ... then select the "Link to Spreadsheet" option. This will keep the text in cells, but it will be fully formattable and linked to the spreadsheet so you can update it automatically as the spreadsheet updates. Note that you can make the cell borders white or invisible so they don't impact the look of the formatting.
5b. If you don't need to dynamically update in the future, then strip out all table formatting when you paste in the text. Use "CTRL-Shift-V" (or "Apple-Shift-V" for Mac) or "Paste without formatting".

It's a little clumsy, but I tested it and it works.
posted by ourobouros at 3:00 PM on July 23, 2019 [1 favorite]


One small thing: it looks like, when you have linked cells in a Google Doc, they don't update automatically when the linked spreadsheet changes. However, it's not that hard. All you have do to is hover the cells in the Google Doc and press the "UPDATE" button that appears.
posted by ourobouros at 3:04 PM on July 23, 2019


ochredraco, check your MeMail -- I shared an example with you there.
posted by ourobouros at 3:34 PM on July 23, 2019


Does this need to be in gDoc?
posted by adamrice at 4:22 PM on July 23, 2019


Thank you for these answers! Ourobouros, I’ll be testing your solution tomorrow.

And yes, needs to be in google Docs because my only computer at the moment is a chromebook, and this document isn’t important enough for me to seek out another computer to use.
posted by ocherdraco at 5:53 PM on July 23, 2019


Try Zapier. Here's their instructions for How to Create and Autopopulate a Google Docs Template. Zapier is one of my favorite tools and is great at combining things.

You can use a Google Sheet as the "trigger" so that when you enter a new row of data, it gets ingested into Zapier and merged into a Google Docs template.
posted by reeddavid at 12:21 AM on July 25, 2019


For my purposes, ourobouros's instructions are perfect. If I needed to do this in a more robust way on a regular basis, Zapier looks like a fantastic tool. Thanks, everyone!
posted by ocherdraco at 7:47 AM on July 26, 2019 [1 favorite]


« Older I want more snake friends   |   Calling all non horn-tooters - how to get the most... Newer »

You are not logged in, either login or create an account to post comments