Microsoft KB Archive/114306

= WD: Inserting Database in Word Document Does Not Retain Pictures =

Article ID: 114306

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition
 * Microsoft Access 97 Standard Edition
 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Office Word 2003
 * Microsoft Word 2002 Standard Edition
 * Microsoft Word 2000 Standard Edition
 * Microsoft Word 97 Standard Edition
 * Microsoft Word 95 Standard Edition
 * Microsoft Word 95a

-



This article was previously published under Q114306



SYMPTOMS
When you use a Microsoft Access or Microsoft FoxPro database in a Word document (for example, a Word mail merge), pictures in the database do not appear.

When you use DDE (dynamic data exchange) to insert the database, you receive the following error message in Word, in place of the picture:

Long binary or text value.

When you use ODBC (Open Database Connectivity) to insert the database, the picture area is blank in Word, and no error message appears.

Note This problem can occur with any database program that interfaces via DDE with the Word mail-merge or database features.



CAUSE
Neither DDE nor the implementation of ODBC in Microsoft Word supports the long binary format that is used to store pictures in a database.



WORKAROUND
To work around this problem when you use a database in a Word mail merge, store the path information to each picture in your database file. For example, create a Picture column in your database, and then type the full path to the appropriate picture in the record.

Note When you type the full path to the picture into your database file, be sure to enclose the path within quotation marks and to use double-backslashes, as in the following example:

"C:\\Documents\\Pictures\\Picture001.jpg"

Then, in Microsoft Word, follow these steps:  Open your mail-merge main document that has your database file attached to it. Move your insertion point to where you want the graphic to be merged into your document. On the Insert menu, click Field. Under Categories, select All. Under Field Names, select IncludePicture, and then click OK. If field codes are not turned on, press ALT+F9. You see the following field:

{INCLUDEPICTURE \*MERGEFORMAT}

</li> Place your insertion point after INCLUDEPICTURE, and then type a space. On the Mail Merge toolbar, click Insert Merge Field. Select the field from Microsoft Access that contains the path to the graphic.

Note Your INCLUDEPICTURE field should now look similar to the following example:

{INCLUDEPICTURE {MERGEFIELD "Picture"} \*MERGEFORMAT}

</li> Turn off field codes by pressing ALT+F9.</li> Perform the mail merge to a new document. Then, you must update the fields in the new document to see the correct graphic. To update the fields in the new document (merged document), follow these steps: <ol style="list-style-type: lower-alpha;"> On the Edit menu, click Select All.</li> Press F9.</li></ol> </li></ol>

<div class="references_section">