Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2021 by Barry MacDonnell. All Rights Reserved.

Page updated May 29, 2015

Para#End - Numbers each paragraph at the end of the paragraph.

Download ParaNEnd.zip (contains v1.01 of Para#End.wcm; 01/11/08; 16,064 bytes)

Compatible with WordPerfect 8 and later versions

WordPerfect 11 users: See important information about using macros in the first release of WP11 ( at the top of this page.

Downloading, Documentation, Modifications, and Support

This macro (Para#End.wcm) numbers each paragraph in the document at the end of the paragraph with a bracketed and automatically incrementing counter, like this:[1]

The macro was created to help those who want to publish to certain online journals that require such numbering.

It is also an example of using a macro to place a WordPerfect counter at various places in the document to display automatically incrementing numbers.


(1) The macro begins by removing any existing bracketed numbers that have the same pattern used previously:

[Left bracket type][Count Disp][Count Inc][Right bracket type]

Note that the order of the two count(er) codes is reversed from that normally produced if you click Insert, Other, Counter, Increase and Display. This is deliberate: Using this pattern removes the need to set an initial counter value to zero (and thus insert an extra code), and helps ensure the process won't remove other "normal" counters that may be present.

(2) Starting at the current cursor location, the macro then inserts a uniquely named counter (ParaNumberAtEnd) surrounded by user-selected text brackets at the end of each paragraph (e.g., [1], [2], etc.). The counter -- and thus the number it displays -- is automatically incremented immediately after each counter is displayed.


You can delete any paragraph along with its bracketed counter, or just the bracketed counter itself (if you don't want to number that particular item), and the remaining counters will reset themselves to the proper numbering. Use Reveal Codes to be sure you delete both of the number's two counter codes.

If you insert a paragraph, either copy an existing bracketed number (copy the brackets and the two codes between them) and paste it at the end of the newly inserted paragraph, or simply play the macro again on the entire document.

Similarly, you can copy any visible bracketed code and paste it wherever desired or needed. Reveal Codes are very helpful in ensuring that you copy all four elements (the two brackets with the two codes inside them). All other counters will automatically reset themselves.

Other documents that were numbered with this macro can be inserted into the current document (presumably, also numbered), and all counters will automatically reset themselves.

If you use a paragraph style (e.g., Heading 2) for short headings, followed by a single hard return, the heading won't be numbered. If there are two or more hard returns between the heading and the next paragraph, the heading will be numbered.


You can use counters to count or number anything in a document. Counters can automatically display numbers, letters, or Roman numerals. They give you control over where numbers are displayed. For an overview and an example of using macros to create them, insert them, or reset them see "Using WordPerfect counters".