Microsoft KB Archive/251031

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 251031

Article Last Modified on 7/28/2005



APPLIES TO

  • Microsoft Word 2000 Standard Edition



This article was previously published under Q251031

SYMPTOMS

When you perform a mail merge to a Microsoft Word document by using currency data in a Microsoft Access database, one of the following may occur:

  • The currency amount may be missing the decimal point (or other separator mark).


-or-

  • The currency amount may be missing the trailing zeros after the decimal point.


-or-

  • The numbers after the decimal point are added to the whole numbers.

For example, if the merged currency data is $18.40, the data may merge as any of the following:

18.
18 40
22


WORKAROUND

To work around this problem, use either of the following methods appropriate for your situation:

Method 1: Use DDE to Connect to the Microsoft Access Database

When you attach your Microsoft Access database file to a mail merge main document in Microsoft Word, use the Select Method option to select DDE instead of ODBC. To change this option in your existing mail merge main document, follow these steps:

  1. On the Tools menu, click Mail Merge.
  2. In the Mail Merge Helper, click Get Data, and then click Open Data Source.
  3. In the Open Data Source dialog box, follow these steps:
    1. Change the Files of type to MS Access Databases (*.mdb;*.mde).
    2. Click to select the Select Method check box.
    3. In the Look in box, select the folder that contains your Microsoft Access database file.
    4. Select your database file, and then click Open.
  4. In the Confirm Data Source dialog box, click to select MS Access Databases via DDE (*.mdb;*.mde).
  5. Click OK.
  6. In the Microsoft Access dialog box, on the Tables tab, select the database table that you want to use, and then click OK.

    NOTE: You can also select a Microsoft Access query on the Query tab.
  7. In the Mail Merge Helper, click Merge and continue your mail merge as usual, or click Close and continue your mail merge as usual.

Method 2: Export the Access Table or Query to a Word Mail Merge Data Source

  1. In Access, in the Database window, click the table or query that you want to export, and then click Export on the File menu.
  2. In the Save As Type box, click Microsoft Word Merge (*.txt).
  3. Click the Save In arrow, and select the drive or folder where you want to save the file.
  4. In the File name box, type a file name, and then click Save All.
  5. Start or switch to Word, and perform the mail merge as usual.

Method 3: Merge Data from a Table or Query by Using the Word Mail Merge Wizard

  1. In Access, in the Database window, click the table or query that you want to export.
  2. On the Tools menu, point to Office Links, and then click Merge it with MS Word.
  3. In the Microsoft Word Mail Merge Wizard, select either of the following options, and then click OK:
    • Link your data to an existing Microsoft Word document. In the Select Microsoft Word Document dialog box, select the mail merge main document, and then click Open.

      -or-

    • Create a new document, and then link the data to it.
  4. In Microsoft Word, click Insert Merge Field on the Mail Merge toolbar to insert the fields that you want.

Method 4: Use the Picture Formatting Switch

NOTE: In some cases, this workaround may not work. If it does not work on your computer, use one of the other methods described in the "Workaround" section of this article.

In your Word mail merge main document, press ALT+F9 to display the field codes. Your mail merge field codes should look similar to the following example:

{MERGEFIELD ProductID}{MERGEFIELD ProductName}{MERGEFIELD UnitPrice}


Add the Picture switch to the field that imports the currency data from your Microsoft Access database. If you want the merged results to appear as $123.45, add the following Picture switch to the appropriate MERGEFIELD:

\# ###.00


For example, your MERGEFIELDS should look similar to the following after you add the Picture switch to the appropriate MERGEFIELD:

{MERGEFIELD ProductID}{MERGEFIELD ProductName}{MERGEFIELD UnitPrice \# ###.00}


NOTE: To hide the field codes after you add the Picture switch, press ALT+F9. Your mail merge main document MERGEFIELDS should look similar to the following:

<<ProductID>> <<ProductName>> <<UnitPrice>>


For more information about general formatting switches for fields in Microsoft Word, click Microsoft Word Help on the Help menu, type general switches in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.


Additional query words: wd2000

Keywords: kbbug kbnofix KB251031