Dynamic Charts and Tables in Word

Microsoft Word has a series of embedded automation fields that can be utilized to streamline the manual copy pasting of charts and tables. Field codes in Microsoft Word allow you to insert dynamic content, such as charts or tables, that update automatically when the source file changes. This is useful for reports like Article IVs or reducing manual formatting errors.

Dynamic Charts with INCLUDEPICTURE

The INCLUDEPICTURE field code in Word allows you insert an image from an existing path file, saved as a e.g., a PNG or JPG file, that is dynamically updated when the file changes. The following steps are ideal for linking charts exported from Excel, R, or Python.

Linking to Locally-stored Images

In order to perform this action, there are a series of steps to follow.

Step 1 – Save the Chart Image

Prior to importing the files, they need to be saved preferably as a PNG, SVG, or JPG file. As an example, save a chart as an image. This provides an example for images that stored locally.

Example:
C:\AIV_Charts\chart1.png

Step 2 – Insert the Field in Word

In Word:

  • Press Ctrl + F9 to insert field brackets {}

  • Type the following:

    { INCLUDEPICTURE “C:\\AIV_Charts\\chart1.png” \d }

    This links the image file instead of embedding it, ensuring that updates in the file are then reflected in Word.

Step 3 – Refresh the Chart

When the source chart changes, you can easily refresh the image with the new version.

  • In Word, press F9 to update all fields.

Note that you should always use double backslashes (\\) in file paths, and that chart will not appear correctly until you manually update fields the first time.

You also have the ability to do this through directly by navigating to the Word Field Menu and click on the insert picture field that would look like the menu below.

Your final product will still show as an image but when you right click on it, you will be able to see it has field properties.

In order for this to work repeatedly, it is important to keep file paths fixed and absolute.

Linking to Web-Hosted Images (e.g., OneDrive)

In addition to linking images stored locally, Word also supports dynamically inserting images hosted online, such as those saved in OneDrive, SharePoint etc.

The steps would be the same, however, you need to include a different switch in your INCLUDEPICTURE field. In your brackets, as referenced in step 2, you would need to adjust to the following format to use MERGEFORMATINET.

  • Type the following:

    { INCLUDEPICTURE “https://intlmonetaryfund.sharepoint.com/teams/WHDPanamaTeam/Shared Documents/2025 Art IV/SR_FIGURES_TABLES/PAN_MON_Output_D_CDS5.png” * MERGEFORMATINET }

In order to use MERGEFORMATINET tolink a SharePoint-hosted image, you must also fulfill the following criteria:

  • You need to be online

  • SharePoint permissions must allow acces

  • It may not always auto-refresh properly

This version of the field links directly to the hosted image URL, and supports auto-refresh when the document is opened if you are connected to the internet. This would be most suited when collaborating across teams where images are centrally maintained, like a broader Article IV report.

Updating All Fields

To refresh all dynamic content in your document at once all you need to do is press Ctrl + A to select all, and press F9 to update all fields (charts, tables, etc.). You can also combine multiple methods in the same word document. However, for web-linked images (e.g., SharePoint/OneDrive), you must be online and have access permissions for the image to update correctly.

By leveraging Word field codes, you can reduce the manual work of copy pasting information and enable faster editing.