How to Include a Microsoft Excel Chart in a Mail Merge

Last reviewed: February 5, 1998
Article ID: Q113445
6.00 6.00a 6.00c WINDOWS
 

The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Excel, versions 3.0, 4.0, 5.0

SUMMARY

To include a Microsoft Excel chart in a Word for Windows mail merge operation, use a DDEAUTO field.

MORE INFORMATION

If you want to perform a conditional merge with a Microsoft Excel chart, you can use the DDE field and the IF statement if that chart is not in the main document.

A sample syntax for the IF statement and the DDEAUTO field using Microsoft Excel 3.0 or 4.0 is as follows:

   {IF {MERGEFIELD JobTitle} = "president" {DDEAUTO Excel CHART2.XLC
   \*MERGEFORMAT}}

The syntax for the statement using Microsoft Excel 5.0 is:

   {IF {MERGEFIELD JobTitle} = "president" {DDEAUTO Excel.Sheet.5
   "C:\\excel\\sheet.xls"  "chart" \p}

Chart represents the name of the chart in the Microsoft Excel workbook.

This statement includes the Microsoft Excel chart only if MERGEFIELD JobTitle is equal to "president"; if it is not "president," the chart does not appear in the document.

REFERENCES

Online Help: DDEAUTO Field


KBCategory:
KBSubcategory: kbmerge
Additional reference words: 6.00 6.00a 6.00c including embed embedding link
word6 winword linking Print Merge excel officeinterop
Keywords : kbmerge kbprint
Version : 6.00 6.00a 6.00c
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.