Microsoft KB Archive/86738

{|
 * width="100%"|

Exact Row Height Does Not Record Correctly with Macro Recorder
'Article ID: Q86738

Creation Date: 15-JUL-1992

Revision Date: 09-SEP-1996' The information in this article applies to:


 * Microsoft Word for Windows versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c

SUMMARY

Setting a table row height to an exact value in Microsoft Word for Windows cannot be recorded correctly using the Record Macro command. In Word for Windows, you can set a table row height to an exact measurement so that the row height changes when you add or delete text in the cell. However, when this action is recorded and played back with the macro recorder, the row height is not set to the exact setting.

MORE INFORMATION

Workaround

A macro recorded to set an exact row height in a table incorrectly sets a negative line spacing value. To set an exact row height in a table with a macro, either edit the recorded macro, or use the macro editor to write the macro, rather than record it. An example of the macro command that correctly sets an exact row height to 3li in a table is as follows:

TableRowHeight .RulerStyle = &quot;0&quot;, .LeftIndent = &quot;0&quot; + Chr$(34), \ .LineSpacingRule = 2, .LineSpacing = &quot;3 li&quot;, .Alignment = 0 The recorded macro sets the .LineSpacing value to &quot;-3li&quot; and sets the table row height to &quot;At Least 3li&quot; instead of &quot;Exactly 3li.&quot; Steps to Reproduce Problem


 * 1) Open a new document. From the Table menu, choose Insert Table. In the Number Of Rows box, select 2; in the Number of Columns box, select. Choose the OK button.
 * 2) Position the insertion point in the first row. From the Tools menu, choose Record Macro.
 * 3) Type &quot;Table&quot; (without the quotation marks) in the Record Macro Name box, then choose the OK button.
 * 4) From the Table menu, choose Row Height. Under Height Of Row 1, select Exactly. In the At box, select 3li, then choose the OK button.
 * 5) From the Tools menu, choose Stop Recorder.
 * 6) Position the insertion point in the second row of the table. From the Tools menu, choose Macro.
 * 7) In the Macro Name box, select Table (the macro recorded above), then choose the Run button.
 * 8) Position the insertion point in the second row of the table. From the Table menu, choose Row Height.

Notice that the Row Height value is now set to At Least 3li instead of Exactly 3li as was recorded. Microsoft has confirmed this to be a problem in versions 2.x and 6.0, 6.0a, 6.0c of Word for Windows. We are researching this problem and will post new information here as it becomes available.

Kbcategory: kbusage kbmacro KBSubcategory: kbtable
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 2.00 2.00a 6.00 winword2 word6

winword