Chapter 6 273
Creating Reports Easily Using ActiveX
Using MS Word for Agilent VEE Reports
Figure 6-17. The Complete Program for Report in MS Word
The entries in the additional objects are as follows:
9. Run the program. It should look like Figure 6-18. (If the colors look
strange in the screen dump, iconize any open applications, so the PC has
a full palette of colors to work with.)
App.ActivePrinter Requests the default printer in a string including
its port.
strLen(str) != 0 Makes sure that
ActivePrinter has located a
configured printer (if the string on the input is not
null, then...), then outputs a 1
(=TRUE) on the
Then pin, which pings the Formula object
containing the
PrintOut call.
DocPrintOut(0) Prints the document.
App.Quit(0) Closes the MS Word application.