WD: Text Form Fields Not Retained During Mail MergeLast reviewed: February 19, 1998Article ID: Q146644 |
The information in this article applies to:
SYMPTOMSA mail merge main document that contains form fields retains the drop-down and check box form fields, but text form fields are not present in the merge result.
CAUSEWord unlinks the text form fields during the mail merge. Word does not unlink display form fields, such as the drop-down and the check box form fields. This behavior is by design.
WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/refguide/default.aspInstead of inserting text form fields into the mail merge main document, insert a placeholder, merge to a new document, and then replace the placeholder with the text form field. Use the following macro to replace the placeholder with a text form field. NOTE: The drawback to this method is that you cannot merge directly to a printer; you must merge to a document, run the macro and then print the document.
Sub MAIN StartOfDocument ' Turn screen updating off. ScreenUpdating 0 ' Note that "<TEXTFIELD>" (below) needs to be whatever the user has as ' a temporary text form field "replacement" in their original merge ' document. EditFind .Find = "<TEXTFIELD>", .Direction = 0, .Wrap = 1 ' This makes sure that there are actually more "fields" to replace ' before putting in a new form field. Without this it would endlessly ' insert text form fields at the end of the document. While EditFindFound() InsertFormField .Enable = 1, .TextType = 0, .TextWidth = "0" EditFind Wend ScreenUpdating 1 'Turn screen updating back on. StartOfDocument End Sub MORE INFORMATIONSome fields, such as the Next and FillIn fields require input either from the data document or from you to continue processing the merge. In this case, Word places the results in the merged document. However, fields that obtain information from document statistics, such as the Numpages field, may be inappropriate for a merged document. As a result they are not retained in the merge result. The following fields are not unlinked during a mail merge:
= (Formula) Advance AutoNum AutoNumLgl AutoNumOout BarCode Date EQ FormCheckbox FormDropDown GotoButton IncludePicture IncludeText Link MacroButton NoteRef Page PageRef Print PrintDate Private RD Section (except in Word for the Macintosh version 6.0 and 6.0.1) SectionPages Symbol TA TC Time |
Additional query words: text form mail merge mailmerge lost stripped
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |