The information in this article applies to:
SUMMARY
When you write Word for Windows macros, you may need to move through each
table cell applying formatting or inserting text. The following sample
macro uses a While loop to move through each cell in the table, formatting
the contents of each cell with bold formatting.
The following macro instructions are used to move the insertion point to
the beginning of the table:
The EditGoTo instruction uses the reserved "\cell" bookmark to select the
contents of the cell so that formatting can be applied to the text. A While
loop is used to move through each cell in the table. The NextCell()
function returns a 0 (zero) when the insertion point is within the final
cell of the table. The following macro instruction loops through the cells
in the table while the NextCell() function returns a value other than 0
(zero):
REFERENCES"Microsoft Word Developer's Kit," version 6.0, pages 52-53 Additional query words: 6.0 loop table While word6 Wend NextCell cell winword
Keywords : |
Last Reviewed: December 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |