User`s guide

270 VEE User’s Guide
6 Creating Reports Easily Using ActiveX Chapter
Using MS Word for Agilent VEE Reports
This lab describes how to display VEE test information in an MS
Word document, including text, a time stamp, and a screen
dump of a VEE pop- up panel with an XY Display. Consult
Microsoft documentation to find out more elaborate ways of
controlling MS Word from other applications using ActiveX
Automation.
Lab 6-3: Using MS Word for Agilent VEE Reports
To begin, follow the steps to declare five variables as type
Object.
1 Click Device ActiveX Automation References... and select
Microsoft Word 9.0 Object Library.
2 Click Data Variable Declare Variable.
a Change the Type field to Object. Clone it four times.
b Name the five object variables App, Doc, Wnd, Sel, and
Bmp.
c Select Specify Object Type on all of them. The advantages
of declaring the particular Class within a Library are as
follows: VEE can do type checking for program errors, and
you can catch events from the Automation Server.
d Then click the Edit... button and select Word for Library in
each case. Select the following Classes:
App will use Application
Sel will use Selection
Wnd will use Window
Doc will use Document
Bmp will use Shape
e Select Enable Events where the class permits it. Iconize
these five icons. See
Figure 159 for the open view of
these variables.