Effect of \*MERGEFORMAT When Updating Link to Excel Sheet

ID: Q86353

The information in this article applies to:

SUMMARY

If you update the link to a Microsoft Excel for Windows spreadsheet in your Microsoft Word for Windows document, the following formatting may be affected:

Whether or not changes in the above formatting occur depends on the presence of the \*MERGEFORMAT switch in the LINK or DDE field. This formatting is also affected by whether you modify the linked information from within Word for Windows or from within Excel for Windows.

MORE INFORMATION

If you link an Excel spreadsheet to a Word document, a LINK field (DDE field in Word 1.x) that references the spreadsheet in Excel will be inserted in your document. If you press F9 to update the results of this field, Word will insert a new copy of the spreadsheet.

If you use the \*MERGEFORMAT switch in a field, the field result will retains the exact formatting of the previous result when you update the field. For example, if your LINK field contains the \*MERGEFORMAT switch and you edit the data, the font, and the border and cell dimensions in your Excel spreadsheet, when you update the LINK field in Word, only the data will be changed in the LINK field results. The \*MERGEFORMAT switch prevents the formatting of the font and the border and cell dimensions from updating. If your LINK field does not contain the \*MERGEFORMAT switch, formatting of the font and the border and cell dimensions, as well as the data, will be updated to reflect changes made to the Excel spreadsheet when you update the LINK field.

Similarly, if you modify the data and formatting of the spreadsheet by changing the results of the LINK field in Word, only the data will be refreshed when you press F9 to update the field results if the field contains the \*MERGEFORMAT switch. The data AND formatting will be refreshed when you press F9 if the field does not contain the \*MERGEFORMAT switch. Therefore, if you want to retain formatting applied to the linked spreadsheet in Word, be sure the field contains the \*MERGEFORMAT switch.

Note: You cannot prevent your Excel chart from resizing each time you update its LINK field in Word by adding or removing the MERGEFORMAT switch. The chart resizes regardless of the presence or absence of the MERGEFORMAT switch.

Reference(s):

"Microsoft Word for Windows User's Guide," version 2.0, pages 748, 756

"Microsoft Word for Windows User's Reference," version 1.x, pages 94-95

KBCategory: kbusage KBSubcategory: kbfield Additional query words: 1.0 1.10 1.10a 2.0 2.0a 6.0 winword 7.0 word95 word6 2.0a-CD 2.0b ddeauto dynamic data exchange winword2 word7

Keywords          : kbfield 
Version           : 1.x 2.x 6.0 6.0a 6.0c 7.0
Platform          : WINDOWS

Last Reviewed: February 6, 1998