WD: Cannot Change Default Data Field Names in Mail Merge Helper

Last reviewed: February 13, 1998
Article ID: Q105033
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word for the Macintosh, version 6.0
  • Microsoft Word for Windows NT, version 6.0

SYMPTOMS

You cannot change the list of default mail merge field names in the Create Data Source dialog box.

CAUSE

You cannot change these defaults because the names are hard-coded in the Word program.

WORKAROUND

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Although you cannot change the defaults, you can use the following sample macros to automatically change the field names when you create a mail merge data file.

   Sub Main
      Dim Dlg As MailMergeCreateDataSource
      GetCurValues Dlg
      Dlg.HeaderRecord = "First,Last,whatever"   ' List of field names
      'Use Windows list separator to delimit field names.
      Dialog Dlg
      MailMergeCreateDataSource Dlg
   End Sub

NOTE: If you press ESC to cancel this macro while it is running, a WordBasic error occurs. Add an error-trapping routine if you want to avoid such error messages.

REFERENCES

"Microsoft Word User's Guide," version 6.0, pages 641-646, 676-692


Additional query words: helper
Keywords : kbmerge macword winword word6 word7 kbmacro kbprint kbdta
Version : WINDOWS:6.0,6.0a,6.0c,7.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.