Se connecter avec Microsoft
S'identifier ou créer un compte.
Bonjour,
Sélectionnez un autre compte.
Vous avez plusieurs comptes
Choisissez le compte avec lequel vous voulez vous connecter.
Anglais
Désolé... Cet article n’est pas disponible dans votre langue.

For a Microsoft Word 2002 and Microsoft Office Word 2003 version of this article, see 291474.

For a Microsoft Word 2000 version of this article, see 212356.

Summary

Consider the following scenario. You open a document from an earlier version of Microsoft Word in Microsoft Office Word 2007. If the document is protected for filling in forms, some fields in this document may not be updated when you complete the form.

This article describes how these fields can be updated. Additionally, the article describes how to use a macro to automatically insert and update the result of one form field into another form field.

More Information

The methods that are described in this article use the tools in the Legacy Forms gallery. To access the Legacy forms gallery, click the Developer tab, click Legacy tools in the Control group, and then click the Legacy Forms tool that you want to use.

Note If you do not see the Developer tab, follow these steps:

  1. Click the Microsoft Office Button, and then click Word options.

  2. Click the Popular category, and then click to select the Show Developer tab in the Ribbon check box.

.

Method 1: Use the "Calculate on exit" option

In Word 2007, form fields include a Calculate on exitoption. When this option is enabled, fields and form fields can be updated in a protected form document.

To enable the Calculate on exitoption, follow these steps:

  1. Double-click a form field to display the Form Field Propertiesdialog box.

  2. Click to select the Calculate on exitcheck box, and then click OK.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

212244 How to update Text form fields automatically by using the "Calculate on exit" option in Word 2000 or Word 2002

Method 2: Update the reference fields in a printed document

You may want to use a reference field to repeat a form field entry elsewhere in a document. These reference fields must be updated to print the form field entry that the reference fields are repeating. An update includes all fields, such as "date" and "time."

To update the reference fields, follow these steps:

  1. Click the Microsoft Office Button, and then click Word options.

  2. Click Display, and then click to select the Update fields before printingcheck box under Printing options.

Note When you select this option, fields may not be updated on the screen. However, Word 2007 updates the fields correctly when you print the document.

Note To use a reference field to repeat a form field entry, follow these steps:

  1. Position the cursor where you want the data to be repeated.

  2. On the Insert tab, click Cross-reference in the Links group.

  3. Click Bookmark in the Reference type list, and then click Bookmark text in the Insert reference to list.

  4. Click to clear the Insert as hyperlink check box.

  5. In the For which bookmark box, select the form field bookmark name that represents the form field into which you are entering the data.

  6. Click Insert, and then click Close.

Method 3: Use a macro

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

You may require all fields to be updated on the screen as you complete the form. This includes fields that are not updated by using the Calculate on exitoption that is described in Method 1. In this case, use the following macro as the "On exit" macro for the form field or fields.

NoteWhen you run the following macro, all fields in the whole document are updated. This includes linked objects, such as a linked Microsoft Excel spreadsheet.

Sub UpdateAllFields()

Dim aStory As Range
Dim aField As Field

For Each aStory In ActiveDocument.StoryRanges
For Each aField In aStory.Fields
aField.Update
Next aField
Next aStory

End Sub

Note Because this "On exit" macro may cause a small delay on some computers, you may want to enable the Update Fields on printing option if the document is to be a printed form. You may also want to enable the Calculate on exitoption, as described in Method 1.

Besoin d’aide ?

Vous voulez plus d’options ?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Ces informations vous ont-elles été utiles ?

Qu’est-ce qui a affecté votre expérience ?
En cliquant sur Envoyer, vos commentaires seront utilisés pour améliorer les produits et services de Microsoft. Votre administrateur informatique sera en mesure de collecter ces données. Déclaration de confidentialité.

Nous vous remercions de vos commentaires.

×