This article has been archived. It is offered "as is" and will no longer be updated.
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.
This behavior occurs because the plain text file format cannot contain text encoding.
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:
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.
In the Look in list, click the appropriate drive and folder where your text file resides.
Click the Files of type list, and then click All Files.
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.
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.
Click the Save as type list, and then click Word document.
Change the name of the file in your VBA program from Your_File_Name.txt to Your_File_Name.doc.