You receive a prompt to select a text encoding format when you run a VBA program that was developed in Microsoft Word

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
When you try to open a text file to perform a mail merge in your Microsoft Visual Basic for Applications (VBA) program that you developed in Microsoft Word, you may receive a prompt to select a text encoding format.
Cause
This behavior occurs because the plain text file format cannot contain text encoding.
Resolution
To resolve this behavior, you must use a Microsoft Word file as a document file ( a .doc file) to store your data for the mail merge program.

To save an existing text file in Word format, open the text file in Word, and then use the Save As command to save it as a document file. To do this, follow these steps:
  1. Start Word.
  2. In Office Word 2003 or in Word 2002, click Open on the File menu.

    In Office Word 2007, click the Microsoft Office Button, and then click Open.
  3. In the Look in list, click the appropriate drive and folder where your text file resides.
  4. Click the Files of type list, and then click All Files.
  5. In the Open dialog box, click Your_File_Name.txt (where Your_File_Name.txt is the name of your text file), and then click Open.
  6. In Word 2003 or in Word 2002, click Save As on the File menu.

    In Word 2007, click the Microsoft Office Button, and then click Save As.
  7. Click the Save as type list, and then click Word document.
  8. Click Save.
  9. Change the name of the file in your VBA program from Your_File_Name.txt to Your_File_Name.doc.
  10. Run your VBA program for a mail merge.
WD2007 Word 2007
Properties

Article ID: 870699 - Last Review: 01/12/2015 23:49:34 - Revision: 3.0

Microsoft Office Word 2007, Microsoft Word 2002

  • kbnosurvey kbarchive kbtshoot kbprb KB870699
Feedback