Example Code

Multiple Page Orientations in Word Document with the Report Generation Toolkit and ActiveX

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 change the orientation of a page in Word.

 

Description

Some Microsoft Word documents can benefit from having different page orientations (portrait or landscape)
within a single document. Each section of a Word document can only have one orientation. In order for your document to
have multiple orientations, it is first necessary to create an additional section. The example below shows how to create
a new section and then change its orientation using ActiveX.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Select a Word file
2. Run the VI.


Additional Information or References

Snippet.png

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