Microsoft KB Archive/870699

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

Article ID: 870699

Article Last Modified on 12/19/2006

-

APPLIES TO


 * Microsoft Office Word 2007
 * Microsoft Office Word 2003
 * Microsoft Word 2002 Standard Edition

-



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.
 * 1) In the Look in list, click the appropriate drive and folder where your text file resides.
 * 2) Click the Files of type list, and then click All Files.
 * 3) In the Open dialog box, click   (where   is the name of your text file), and then click Open.
 * 4) 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.
 * 1) Click the Save as type list, and then click Word document.
 * 2) Click Save.
 * 3) Change the name of the file in your VBA program from  .txt to  .doc.
 * 4) Run your VBA program for a mail merge.

Additional query words: WD2007 Word 2007

Keywords: kbtshoot kbprb KB870699

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.