4

The document is commercial contract for my clients. Every time I fill the document I need to write the name, the address, id, etc. of my client several times in different places of the document. Since the document has 13 pages it is time wasting. Using placeholder would allow me to fill the data just one time

Is there any way to use Placeholders in Google Docs?

My {NAME} ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec {ID} quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In {ADDRESS} enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt.

  • 1
    I think you need to explain what you want those Placeholders to do: if they don't do anything, then surely you can just type them in, as per the example? – MaryC.fromNZ Sep 11 '13 at 10:42
  • The document is commercial contract for my clients. Every time I fill the document I need to write the name, the address, id, etc. of my client several times in different places of the document. Since the document has 13 pages it is time wasting. Using placeholder would allow me to fill the data just one time. – chefnelone Sep 12 '13 at 6:03
1

You could think of it as a mail-merge field: put merge fields in, and then each time you use the document to generate a contract, just have one row (the current client's details) in the data file. That said Google Documents don't directly support mail merge (yet -but I expect they will sooner or later). However there do appear to be some options - see this help forum article: http://productforums.google.com/forum/#!topic/docs/c6NBVY9xDDE

Another option is just to use a (or several) phrases that you are 100% sure won't appear anywhere else in the document (eg [CUST-NAME] ), and then use Edit > Find and replace > Replace all when you are ready to generate a document for a specific client. This is a little more work each time you set up the document, but easier to set up.

2

I'm still looking for a better way, but this is my solution for extensive text replacing.

I used Autocrat to accomplish this:

  1. I created my Google Docs text files and analyzed what I needed to be replaced.
  2. Words that needed to be replaced became placeholders << placeholder1 >>, << placeholder2 >>, << placeholder3 >>,... (But with more significant meaning and without the spaces).
  3. I created a Google Spreadsheet, with column names representing the placeholders.
  4. I used Autocrat to create a merge, linking all columns to placeholders.
  5. Autocrat creates a new file with the replaced text.
  6. Have a coffee.
0

You could use the Script Editor to whip up an add-on that will do just that, or you could use an existing add-on, like Doc Variables.

0

Wouldn't a simple find and replace do the same thing?

Find: {name} Replace with: Fred

  • Welcome. I just added a clarification made on a comment to the question body. I agree that using Find & Replace is simple when there is only or very few placeholders and this will be done only few times a week but it isn't if the placeholders are many and it should be done tens or hundreds of times every day. (By the way, Find and Replaces is mentioned on the accepted answer) – Rubén Sep 27 at 14:00
0

This is commonly known as "mail merge".

If you have to do this just very few times a day and have very few placeholders, using the built-in find & replace could be good enough but if you have several placeholders and/or have to do this tens or hundreds of times a day it worthy to create an script by using Google Apps Script or use one already published as a Google Documents add-on. If know how to work with APIs you could use the recent launched Google Documents API.

On https://developers.google.com/apps-script there are some samples about how to do a mail-merge using Google Apps Script

Related

Reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.