#How to add form fields in word how to#
For example, in a mailing list, each row might include information about a particular recipient.Ĭreate your Excel data file, and then arrange it by using the fields that you want to use for your letter, as shown in the following sample data file.Īfter you create your Excel data file, save it, and then close the data file.įor more information about how to create a mail-merge address list, click the following article number to view the article in the Microsoft Knowledge Base:Ģ94688 How to design and set up a mail merge address list in Word 2002 and in later versions of Word
The first row should contain field names for each column - for example, Title, Salutation, First Name, Middle Name, Last Name, Address1, and Address2.Įach row should provide information about a particular item. Note the following requirements for the data table: The text in an output document can be the same in all output documents, but you can apply formatting to specific documents.īefore you proceed with the Mail Merge Wizard, make sure that your Excel worksheet is well structured for this purpose. The output documents are the result of the mail merge. This database is typically a list of names, addresses, phone numbers, and other categories of personal information. For example, the recipient list is a Microsoft Access database file or an Excel worksheet. The recipient list is a database that contains the data that is to be merged into the output documents. It may contain a letterhead, text, and instructions in merge fields for inserting text (such as recipient names and addresses) that vary from one output document to another. The main document contains the basic text that is the same in all of the output documents. When you use the Word Mail Merge feature, Word merges a main document with a recipient list to generate a set of output documents: This article explains how to use the Mail Merge feature in Microsoft Word to create and to print form letters by using data from a Microsoft Excel worksheet. Of whether the field has been visited, then you need a different macro, one that's unfortunately rather more complicated.How to use the Mail Merge feature in Word to create and to print form letters that use the data from an Excel worksheet If you want the check for an empty field to happen when they save or close the document, regardless In either of these cases, the macro won't run if the user's cursor never enters the field or content control. MsgBox "This field must be filled in.", vbExclamation, "Required Field" If ContentControl.Title = "fullname" And ContentControl.ShowingPlaceholderText = True Then
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) This goes in the ThisDocument module of your document or template: If you prefer to use the content controls, then you need a different macro. In the Exit dropdown, select the name of the macro ( MustFillIn). Put the field's name in the "Bookmark" box - that name is what the macro will use to identify the field. After inserting a form field, click the Properties button to get its properties dialog, which is different from the one for contentĬontrols. That macro is intended for use with legacy form fields and won't do anything with content controls.Īlso, the "filling in forms" type of editing restriction is for legacy form fields, not for content controls.Īt this point, the simplest way to get your form working is to replace each content control with the corresponding form field.