Microsoft KB Archive/38753

From BetaArchive Wiki

Sample Macro for Merging Chapters of a Book

PSS ID Number: Q38753 Article last modified on 11-02-1994

4.00 5.00 5.50 6.00

MS-DOS

The information in this article applies to:
- Microsoft Word for MS-DOS, versions 4.0, 5.0, 5.5, 6.0

SUMMARY

The following example demonstrates how to set up a macro that can perform several document merges (for example, the chapters of a book). After the chapters are merged, the document can be printed.

<<set loop=0>> <<set number=?how many chapters>> <<while loop < number>> <<set loop = loop + 1>> <<include <<loop>>>><enter> <<endwhile>>

The macro merges several chapters into one final document. The merged files are named with consecutive numbers starting at “1”.

KBCategory: kbother kbmacro KBSubcategory: Additional reference words:

============================================================================= Copyright Microsoft Corporation 1994.