Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm creating a form using Microsoft Word 2010. This form contains a simple text box called ProjectName. The text entered into this field shall appear on the document's cover page. How do I do that? If possible the text on the cover page shall be updated as soon as the user either types something in the text field or leaves the field after having typed.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I tested this on Word 2007, and it works fine. Hopefully it should be OK for Word 2010 too.

You have to create a bookmark, and then 'cross-reference' it to automatically update it each time. Say you fill in your name somewhere in your form and want it to update in the cover page automatically.

Follow these steps:

  1. Type in the text box entry and highlight the entire field enter image description here
  2. Go to Insert > Bookmark and type in a name for the bookmark, as shown below enter image description here
  3. In the cover page, place your cursor at the the location you want you name to appear and then go to Insert > Cross-reference
  4. Choose the reference type 'Bookmark' and uncheck 'Insert as hyperlink'. The hyperlink would allow you to directly navigate to the cross-reference, which is not what you might want. All you want is to update the cross-reference automatically if the bookmark changes
  5. The cross-reference should appear at the location enter image description here
  6. Now change the name you entered at your bookmark location by typing the new name before the existing one, and deleting the old name. NOTE: Do not highlight ProjectName and replace it with another name
    enter image description here
  7. To update the cross-reference with the new bookmark, select all text in the document and 'Update Fields' using the shortcut ctrl+A and then F9
  8. The cross-reference should be updated automatically as shown below enter image description here

Test your bookmark/cross-reference pair by repeatedly changing the name and updating fields each time. This nicely auto-updates text throughout your document.

share|improve this answer
    
One of the best descriptions I've found so far. Thanks! :-) However, do you additionally know a way so that the cross-referece is updated automatically when e.g. leaving the bookmark field? –  Robert Apr 20 '12 at 18:19
    
@RobertStrauch No, I don't think there's a way to do that automatically. Word does have an update fields automatically option but that doesn't work for all fields. In any case, the automatic update only works if you close and reopen your document. So you're much better off using the "select all" and "Update Fields" option. –  prrao Apr 20 '12 at 18:29
    
Also, to select ALL fields (main body text and text box text) in one go you'll have to change your text box format "Text wrapping" to be in line with text. This clubs the text box objects together with your body text, so you don't need to update each set of fields separately –  prrao Apr 20 '12 at 18:31

Use bookmarks and StyleRefs as noted in other answers

prrao gives a fine way to do this using bookmarks. (BTW - F9 will update all fields in a document.) If this works for you, then definitely use it. It's straightforward. But that method is fragile. Some people run in to problems because it's all too easy to delete a bookmark. It's all too easy to delete the text of the bookmark -- which also unfortunately will delete the actual bookmark.
Charles Keynon points to a good webpage that describes some other ways to get data to update. One of the ways described on the page is to use StyleRef: If you define a style to apply to the text you want to repeat (e.g. define a style called "companyName" and apply it to the company name on the first page of your document), then you can insert that text by using a StyleRef field. It works a lot like bookmarks (the Ref field) except that if you delete the text you're not in such big trouble: the style you need still exists. But you need to somehow know, without any obvious prompts in the document, that you have to specifically apply that one style to the text. And things can get tricky if you use that style in more than one place. And because it's a field just like the Ref (bookmark) field, updating isn't automatic.

Again: if using bookmarks (Refs) or StyleRefs works for you -- do it. But if you run into trouble, then...

Content Controls + the WCC Toolkit is a more robust approach that automatically updates

If you need something more (less fragile than bookmarks, something not tied to using a particular style only once in a document), and something that will immediately update the info no matter where you change it in your document, then use content controls + the (free) Word Content Control Toolkit. (The toolkit is a little open source application that you can download for free from CodePlex.) The gist is this: you define content controls in your document for each piece of data that you want to use elsewhere (e.g. the company name). You use the toolkit to connect the content controls to one XML name. You can have many content controls in your document all named "company name" and no matter which one you update (change the company name), they will all use the same data. And they will all update immediately. The downside is that you need to do a little back-and-forth between Word and the Toolkit. But what you need to do is very much like connecting field references -- you just need to use the Toolkit to do some of the 'connecting.'

John Chapman has a really well done explanation that steps you through using this: Using Content Controls to Repeat Form Fields in Microsoft Word 2007 and Word 2010 (I want to give him credit, plus he's already done the work of doing screen shots. No sense in me essentially reproducing all of that here.)

share|improve this answer

See Repeating Data. Various methods for doing this in different versions of Word are explored.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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