<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>CAD Forum discussion (EN) : Reporting using MS Word(VBA)</title>
  <link>https://www.cadforum.cz/forum_en/</link>
  <description><![CDATA[This is an XML content feed of; CAD Forum discussion (EN) : AutoCAD : Reporting using MS Word(VBA)]]></description>
  <pubDate>Thu, 23 Apr 2026 20:52:54 +0000</pubDate>
  <lastBuildDate>Mon, 03 Sep 2007 09:51:46 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum_en/RSS_post_feed.asp?TID=84</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD Forum discussion (EN)]]></title>
   <url>https://www.cadforum.cz/forum_en/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum_en/</link>
  </image>
  <item>
   <title><![CDATA[Reporting using MS Word(VBA) : Heya  Created a report via VBA...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=84&amp;PID=189&amp;title=reporting-using-ms-wordvba#189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=371">GaryM</a><br /><strong>Subject:</strong> 84<br /><strong>Posted:</strong> 03.Sep.2007 at 09:51<br /><br />Heya<img src="http://www.cadforum.cz/forum%5Fen/smileys/smiley4.gif" height="17" width="17" border="0" align="absmiddle" alt="Big%20smile" /><DIV>&nbsp;</DIV><DIV>Created a report via VBA looking at the active drawings <EM>LayerOn</EM> property. If its true it should populate the Columns and rows created via vba with only the data of the layer where their <EM>LayerOn = True. </EM>Its working fine, but its putting all the data into the report hiding the layers thats off. So instead of giving for example two pages of data, it gives me 4 pages with 2 pages of printable data.</DIV><DIV>&nbsp;</DIV><DIV>The code is as follows;</DIV><DIV>&nbsp;</DIV><DIV>Dim objLayer As AcadLayer<BR><FONT color=#006633>'only put unknown layer data in table<BR></FONT>&nbsp; For Each objLayer In Application.Documents cboDrawingName.Text).Layers<BR>&nbsp;&nbsp; If objLayer.LayerOn = True Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With mobjTable<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cell(lngRow, lngColumn).Range.Text = objLayer.Name<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngColumn = lngColumn + 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.LayerOn)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngColumn = lngColumn + 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.Freeze)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngColumn = lngColumn + 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Cell(lngRow, lngColumn).Range.Text = ConvertToWord(objLayer.Lock)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngColumn = lngColumn + 1<BR><FONT color=#006633>'increment the row counter</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngRow = lngRow + 1<BR><FONT color=#006633>'column counter must begin at 1</FONT><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lngColumn = 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End With<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp; Next objLayer</DIV><DIV>&nbsp;</DIV><DIV>Is there a way i can only populate the table with layer data i need?</DIV>]]>
   </description>
   <pubDate>Mon, 03 Sep 2007 09:51:46 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=84&amp;PID=189&amp;title=reporting-using-ms-wordvba#189</guid>
  </item> 
 </channel>
</rss>