Example Code

Insert Image in Microsoft Word Table Using LabVIEW

Code and Documents



This an example to insert an image into the table cells of a new Microsoft Word document using the LabVIEW Report Generation Toolkit.



Using the LabVIEW Report Generation Toolkit, we can add a table into a new Microsoft Word document by using the New Report VI and the Append Table to Report VI.  However, this appears to only allow a user to enter text into the created table cells.  If a user wants to insert an image into one of these cells instead, there is a way to do this using the Word Edit Cell VI and using a File Path Control to specify the path of a saved image.



  • LabVIEW 2012(or compatible)
  • LabVIEW Report Generation Toolkit 2012(or compatible)


Steps to Implement or Execute Code

  1. Save the image you want to insert into a Word table cell as a .jpeg, .bmp, .png, .gif, or .tif file.
  2. Select this file path using the File Path Control on the VI front panel.
  3. Run the VI.

To adjust which cell into the table is being inserted, edit the Start (0,0) terminal of the Word Edit Cell VI to change the desired row and column for the image.


Additional Information or References

VI Snippet





**This document has been updated to meet the current required format for the NI Code Exchange.**

Austin S.

National Instruments
Academic Field Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.