Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things InDesign!

Updating Bits of Text Across Multiple Documents

Eddie wrote:

I create a lot of sales literature that includes the same office phone number footer. We keep adding offices and changing the numbers. Short of opening every InDesign document and doing a find/change on the phone number, is there a better way to update? Like linking somehow to a single file? Can you link to text or snippets like an image, so every time the doc is re-opened, it updates?

This is a common request, and the answer is (as it so often is): yes and no. InDesign won’t let you link to snippets, but it will let you link to a text file. We discussed linking to text files in podcast Episode 38, but I don’t think we got into the details of how to link to a little chunk of text that changes periodically. Here’s what you can do.

First, I’ll create a Word document with the boilerplate text I want to link to from all my documents.

boilerplate1

In this Word document, I create and apply a paragraph style (in this case, I’ve called the style inlinephonenumber). I do not apply any additional local formatting.

Next, in InDesign, I open the Type pane of the Preferences dialog box and turn on the “Create Links When Placing Text and Spreadsheet Files” checkbox, and click OK. I don’t normally like linking to text files, but in this case, it works pretty well.

Now I make sure I have a paragraph style with exactly the same name in my InDesign document, then import my Word doc.

boilerplate2

Now I press Command-Option-C/Ctrl-Alt-C to fit the frame to the text, then use the Selection tool to cut the whole frame out and paste it into the frame where I want it. This step is optional, I suppose. If you don’t need it anchored in some other text frame, then ignore this.

boilerplate3

(Note that I specifically chose Trajan here as my font after watching this brilliant video.)

Because my inlinephonenumber style is based on the paragraph style for the rest of the text, it all matches perfectly.

Now I turn off Create Links in Preferences, just so I don’t mess myself up later, next time I import a Word file.

That’s it! The phone number is linked to the Word file on disk. If I edit the Word file, the Links panel shows it as Modified and I can click the Update button. Or, if I’m already in the InDesign file, I can choose the link, click the Edit Original button (or choose Edit > Edit Original), change the Word file, save it, then return to InDesign, and it gets updated automatically.

There is no way to tell InDesign to update all your links everytime you open a document, but if you do open a document that is linked to a modified file, InDesign will warn you.

boilerplate4

I don’t like to click Fix Links Automatically because… well, I guess because I like to be more careful about updating. I prefer to click Don’t Fix, then inspect the Links panel carefully and update the ones I want to update. But if you’re a trusting soul, then you could just do it automatically.

If you’re going to do this, you should be aware that anchored frames cannot break on to two lines. That’s kind of obvious, but it’s important. That means that you can’t expect to link to a whole sentence, then anchor that sentence inside another paragraph. It just won’t work right. But for a phone number or something like that, this method can work pretty well.

Also note that unlike linked graphics, you don’t need to send the original text file along with your InDesign document to print. The text will print just fine even if it’s listed as missing in the Links panel. That said, it might freak our your print shop, so before sending your files, you may want to select the linked text files in the Links panel and choose Unlink from the panel menu.

David Blatner

David Blatner

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at Lynda.com are among the most watched InDesign training in the world. You can find more about David at 63p.com.
David Blatner

Latest posts by David Blatner (see all)

  • - November 30, -0001
Related Articles
Comments

43 Comments on “Updating Bits of Text Across Multiple Documents

  1. Would a CS3 file be another choice?

    I thought that when you relinked text from a text file that it did not retain the styles that you applied in InDesign?

  2. Eugene, linking to another InDesign file would be a great choice if it weren’t just text. But in this case, a Word file is just way easier, I think.

    As for the linked paragraph styles: You make an excellent point. It’s crucial that you not apply any local formatting or make any local edits to the text after you import it. Otherwise, this whole thing breaks.

    In this case, it works because the paragraph style was applied in Word, there was a paragraph of the same name in InDesign… it maps perfectly when you import it or when you update it.

    BTW, here’s another warning: This won’t map properly if you had to use the Import Options dialog box in any way the first time you import the file. For example, if you had to use Map Styles to map one style to another, or to map to a style inside a style folder… then this won’t work because InDesign forgets everything you did in the Import Options dialog box when it updates the file. Frustrating.

  3. Hmmm. But, since I’m an inveterate hater of the super-bloated Word program and its super-bloated, complex .DOC file format (I refuse to have any MS Office apps on my systems), I have to ask: what the heck is the purpose served by using the .DOC format and a Word-applied paragraph style at all?

    I just made a test now with a plain .TXT file, a glorious simple, small, clean file format which of course can contain no paragraph style or other garbage. I created a link as I placed the .TXT file in InDesign, I saved and closed my InDesign file, then changed the .TXT file info, then opened the ID file — I got the link update warning, I accepted the auto-update, and the information was flawlessly updated and its proper Paragraph Style was retained. So — aside from keeping a local Character Style override — which isn’t needed when the data is its own paragraph, as here in this example — can you please tell my what purpose is served by using the needlessly complex and bloated Word route and its style?

  4. Klaus, I can’t replicate what you did, and I’ve tried several combinations and it won’t work. The txt file (on windows) reverts to basic paragraph.

    With David’s, example, and I’m sure he will correct me if I’m wrong, is that he set up a Paragraph Style in Word called something like Heading 1, then you have a Heading 1 style inside the InDesign file. When you update the .doc file and update the link in InDesign, then the text remains with that paragraph style.

    Again, I can’t get the text file to retain the formatting.

    On that note, is there a difference if you use .rtf? Would that be the same, different, worse.

    I did realise that when you save the Import options in the Placing of text files, with the show options, that if you save the options for .doc file, that preset isn’t available for a .rtf file and vice versa.

    I’m not sure if that is fixed in CS3?

  5. Since I don’t have Word I can’t test this, but I bet that David’s .DOC file with the phone number is, say, 50 to 100 times as large in bytes as my .TXT file with the exact same data. Yes, hard drive prices are great nowadays — still, that is never an excuse for using bloated files when much smaller ones do the same job.

    Oh wait, I can save the phone number from ID to, not .DOC, but .RTF, which is probably not more bloated than .DOC, maybe less. And the file size difference between my .TXT and the .RTF is 926 bytes vs. 16 bytes. So the .RTF is larger by a factor of 57!!! And I’m willing to bet that .DOC is no improvement . . .

  6. Eugene, I’m on WinXP. My data, updated via the .TXT file, retains whatever Paragraph Style is applied in InDesign — so I don’t know what’s going on on your system. Yes, I understand the mapping of same-named Styles — I just claim that the whole bloated, complex .DOC route is unnecessary.

  7. I’ve worked with linked excel (as unformatted tabbed text) docs and found that the formatting it applies depends on what paragraph style is selected before you update, and if there is a default text object style.

  8. Klaus, are you using a floppy disk as some sort of hard drive? :=)

    I get a warning that says:
    “Edits have been made to the imported version of “Text.txt”. You will lose these edits by updating. Update anyway?”
    Apply to all. Yes/No/Cancel

  9. Thanks, Adam — you’re right. Eugene, I tested some more, and it turns out that it’s the currently selected Paragraph Style which gets applied when you update a linked .TXT file. So this worked fine for me, as I — unwittingly — had the intended Style selected when I did the link update — but when I have another Style selected that gets applied to the updated .TXT linked data. So the .TXT data link isn’t foolproof — you can lose your formatting when doing a link update. And hence, I guess, the bloated .DOC route can insure against that — much as I hate to admit it!

    But wait — all is not lost to the Bloated Giant! For I’m pretty sure that, for small files like we’re dealing with here, the .RTF format is far smaller than the hate-worthy .DOC format, so that’s one way.

    But there are still two other ways I — and anti-bloat purists like myself — can avoid .DOC for externally updatable data files: the InDesign Tagged Text format, which is pure .TXT and makes for really small files *with* Styles embedded — and Data Merged .TXT files. For all Data Merged updated info retains whatever InDesign formatting has been applied — and given how dirt simple the excellent Data Merge function is in InDesign, that’s a very viable contender, too.

    So: we have plenty of options for our externally updatable data files!

  10. That’s brilliant. I ended up placing a spreadsheet rather than a doc because I have six phone numbers with our offices at the bottom of every sales piece, and that’s made sure that they remain equally spaced, too.

  11. I have to say, I’m a fan of the copy and paste, and using the Paste without formatting keyboard shortcut. I don’t link the potential spillage linking text files can create. But I guess in some circumstances it is desirable.

  12. An afterthought: given that ID obviously has some code in place already to maintain all text formatting for external data which comes in via Data Merge — could that mean we might get the same functionality in CS4 for other types of linked files — so we wouldn’t lose our ID formatting if we update the links? Wouldn’t that be great?

  13. Just “discovered” a newer way to do this and you don’t have to worry about styles going mad.

    Insert a .doc/.rtf/.txt file anywhere on the page. Leave it set to Basic Paragraph. Put it on another layer, set that layer to non-printing (turning it off won’t work, you’ll see why)

    On the first layer make your text box at the bottom of the page (or where desired. Copy the text into the box, style it the way you want it. (Unfortunately I can only get this to work on a single line of text).

    Create a new Text Variable and choose Running Head Paragraph Style.

    Select Basic Paragraph Style (as this is layer 2 text).

    Insert the Variable into Layer 1 text box.

    Now change the text in your original text. Update the Link in InDesign and the variable will have the new text in there with your Paragraph Style.

    This relies heavily on the persons file not using Basic Paragraph Style for their paragraph styles in their document.

    But it works. And the layer does not print.

    I have a book where I set up variables in the running head, but because I had two lines and the first line at two variables, both towards the spine and right aligned to the text on the next line, and the next line had 3 varaibles (a total of 5 variables on one page and 10 over a spread, this increased for some sections). Well on the right hand page you could align the variables easily, but the left hand page didn’t like right aligned tabs, and different length of text made undesirable results.

    To cut this story short, I inserted the variables into tables. And it could right align the paragraph inside the cell much better.

    The thing I like about the variables is you can make as many as you want as long as you different Paragraph and/or Character Styles in your text.

  14. I lost my connection as I was typing my little bit, clicked Submit and lost my reply, Arrgh!

    Anyhow, I noticed that Eugene touched on what I was going to talk about, Text Variables and the Book panel.

    I did a job for a client that had a similar request. Basically they needed a full complement of collateral for their company. Similar to the OP, they wanted to be able to change content across all the InDesign files.

    I defined custom text text variables for company name, address, phone number, etc. I inserted the text variables within all of the business cards, brochures, letterhead, envelopes, etc.

    This is where I find the Book panel to be a great candidate, having the ability to synchronize Text variable across multiple InDesign documents.

    The nice thing is that the text is entirely independent of its formatting. A little prep in advance but a great time saver for the client.

    Just my 2 cents…

    P.S. Lesson learned. Copy my reply to the clipboard before clicking on the Submit Comment button ? just in case.

  15. Just a point of clarification: a text variable does not have to be used in conjunction with a paragraph style. That’s only if you are using running headers. You can make any old thing a text variable. Simply open the text variable definition dialog box, then choose custom text, type what you want it to say, and save it. Insert that text wherever you want it. When you change the variable, every instance of that text changes. Hope this helps. :-)

  16. Thinking about this further, I see the difficulty comes if you want this to ripple through multiple documents. The variable method works on a per document basis, so David’s linking technique would be preferable for multiple docs. Not sure how variable behave in book documents, though. That may be something to investigate.

  17. Yes Lynn, I knew of the option for custom text, but it doesn’t work with linked text, as what was required by the original postee. But, it would work with other suggestions, like putting the documents into a book and sychronising just the variables. It is definitely an option for some people.

  18. Alternate solution would be to use a link to an XML file in the footer of your master page.

    If you map tags to styles, formatting is preserved when you update the link to the XML file, if an office is added, it will be formatted appropriately as well.

  19. Klaus, I can appreciate your desire not to use .doc files. But as you noted, yes, this works great with RTF files. Of course, ifa 2.9 K RTF file (the size of that one phone number) is still to big for you, my guess is that you’ve got bigger hard drive issues than we can solve here. ;)

    The great thing about RTF is that just about every word processor around can create it, including WordPerfect, etc.

    You can even just do this in InDesign itself (with no word processor): Each time you want to edit the number, just edit one instance of it, then choose File > Export and export it as an Rich Text Format (RTF) file, replacing the original.

  20. LOL! OK, we’ll leave my “hard drive issues” out this. Editing RTF with ID? Yes, and we can shoot gnats with cannons, too. But in a pinch — if my Notepad should be dysfunctional — it would serve.

  21. Obligatory InCopy comment … ;-)

    FWIW you can synchronize the contents of one or more text frames (even containing multiple lines/grafs) throughout a document and/or among documents with the InCopy plug-ins that come with CS2 and CS3. You don’t need InCopy to create the external linked .incx file. Just select a frame and choose Edit > InCopy > Export Selection. Then place that .incx file whereever you need it.

    Nor do you need IC to “edit original,” you just check out any placed instance of the frame, edit it and check it back in. Doing that actually edits/changes the external .incx file, so now all docs linked to it get the “out of date” icon and can be updated to match.

    However I think it’s easier to use the Export to RTF function — no need to set a User name, no funny icons on frames (though that might be a useful identifier come to think of it … to distinguish linked frames from normal frames), no need to check out/in.

    For short, less than one-liners like phone numbers, I love the idea of Variables though. It’s the only solution where you can link just the text string and not the formatting. Thanks for the movie Lynn!

  22. I learned a little trick from an online tutorial that might help.

    You create a user dictionary in the Preferences panel (on a mac). Add the address or information you frequently type. Then set the Spelling to auto-correct. So this is handy because you can type in certain combination of letters & numbers and set up the dictionary to fill in the info for you.

  23. I’m voting for InCopy here. The problem from my standpoint with the RTF method is that you have to set your preferences to create links when placing text or spreadsheets. It’s all or nothing at all.

    So what happens when I get a few Excel files and more Word files to place?

    The last thing I want in a document is a bunch of text links that might accidentally get updated and I certainly don’t want to have to unlink them either. (Yeah I know, it’s only a few mouse clicks, but I’m lazy :) )

    With InCopy and careful use of paragraph and character styles you can not only control the content but the styles as well.

  24. Is it just me or there is no warning any more when you open a document in InDesign which is linked to a modified file?

  25. John, I think it’s just you. ;) I am constantly bombarded by that warning dialog box. Perhaps rebuild your preferences?

  26. Plus one here on the InCopy method. I’m using that to link entire common stories, (including their styles, anchored objects, and inline tables), among various manuals. It’s been a real time saver.

  27. GM, yes, as our iillustrious colleague Cari Jansen pointed out, you could use XML. The Import XML dialog box offers a way to link the XML file.

    I’m not sure how to make this would work if you had a number of linked files, though. InDesign doesn’t really like the idea of linking to more than one XML file, it seems. Or, it may be able to do it, but it’s tricky (like everything else having to do with XML).

  28. The way I handle this is to set a few common text variables (name, phone number, address, website) in a single file, and then load the variables into a new file when I start it. That way the text can be styled independently, and can also be easily changed in just one document.

  29. Pingback: InDesignSecrets » Blog Archive » Synchronize Multiple InDesign Documents

  30. You wouldn’t be able to do this with multiple XML files. InDesign can only handle one file at a time. But each XML file can hold multiple pieces of data. So, you would have to put all the phone numbers and other elements into the XML.
    Each data element can then be inserted as needed throughout your layout. The formatting can be applied by mapping the XML tags to the paragraph and character styles.

  31. Pingback: InDesignSecrets Videocast #12: Linking Text Stories | InDesignSecrets

  32. Pingback: InDesignSecrets Podcast 179 | InDesignSecrets

  33. Pingback: InDesignSecrets Podcast 180 | InDesignSecrets

  34. I know this thread ended some time ago, but just thought i would mention in CS6 the “Create Links When Placing Text and Spreadsheet Files? checkbox is now in the File Handling preferences.

    I tested linking a doc file, made word styles, updated fine…but no colour. It also added the imported style as a new style instead of using my existing style of the same name. But that may be because i have my style within a folder in the paragraph styles panel.

  35. This was a while ago, but going back to the text variables option:

    I created a single custom text variable and copied it across all my layouts, then created a book with all the layouts.
    Now that I’m trying to update the custom text variable with new text (a particular date), it won’t seem to update all the layouts to the new text.

    Does anyone know how an InDesign book goes about choosing which text variable to synchronize all the others to?
    My approach was to open one of the layouts, update the custom text variable with new text (which then updated all of them in that layout successfully, then went to my InDesign book file and tried to synchronize. Didn’t work :/

    Any ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *