Create a Table with the Word Document

Inside your newly created document you want to create a table. First, determine how many columns are needed. Table 22-2 outlines the various columns you want to represent in your table:

Table 22-2. Layer States Being Reported




Determines if the layer is on or off


Determines if the layer is frozen or thawed


Determines if the layer is locked or unlocked


Layer color


Layer linetype


Layer lineweight


Layer plot style


Determines if the layer will be plotted

Nine columns of data and the number of layers within the drawing will control the size of the table, as illustrated in the following:

Set mobjTable = mobjWord.ActiveDocument.Tables.Add _ (mobjWord.ActiveDocument.Range, _

Application.Documents(cboDrawingName.Text).Layers.Count + 1, 9)

Notice the row count (the number of layers within the drawing) is the layer count plus one. This extra row will be used to place a column header in our report.

Was this article helpful?

0 0
100 Bowling Tips

100 Bowling Tips

Playing bowling with your friends can help you decide if it is indeed the hobby that you want to invest your time on today. Aside from that, it can help you get a better feel of the sport. More importantly, when you play with your friends, it would become a more fun activity, which you can look forward to each week.

Get My Free Ebook

Post a comment