Example Code

Create a Table in Microsoft Word and Scroll Through the Available Formats

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies how to create a Table in Microsoft Word and scroll through the different format styles available.

 

Description

This VI will open a new Microsoft Word document and insert a table. The user can then use the up and down arrows to scroll through the autoformats that are available. This is helpful because the Word Table VIs have an autoformat input that is expecting an integer, but there is no easy way to associate these numbers with a style. Scrolling through allows you to pick the one you like best easily. For more information on the autoformat input, see Knowledgebase Document 4X6EO8QN: How Do I Use the Autoformat Table Input in the Report Generation Toolkit.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Use the Up and Down keys on the keyboard to change the format of the table
3. When desired, stop the application with the Stop Button

 

Additional Information or References

 Snippet.png

Scott G.
AE Specialist
National Instruments

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