Your I-beam holds the place for the test name. Bookmarks are place holders in Word documents, and you can program VB to insert data into any bookmark. Place additional unique bookmarks in the report template where you want specific data to go. Be sure to note the bookmark names you've chosen for specific locations. After creating the template, you're ready to write VB code that will send data from your VB data-acquisition or test program to the document.
Descriptive names make the code easier to read and maintain.
For simplicity, assume that all the test information resides in global variables. Once you've written a VB program to acquire the data and perform the calculations, you can write code that transfers data to your report. Listing 1 shows the first steps. Finally, the code uses Word's .FileOpen function to open your SimpleReport with Bookmarks.doc template . The next step is to write code that will transfer the test information from VB to Word.