Description
The Paginate method is obsolete and is maintained only to avoid breaking existing applications. It has been replaced by the Pageinate2 method. This is because the last argument to Paginate, a pointer to a long integer which is to receive the computed printable page count, is incorrectly declared as a simple long integer (not by reference) in the type library.
This was easily worked around in pointer-aware languages such as C or C++ (by passing a pointer in a long int variable) but not in others. In Paginate2 , the type library declares the plTotalPages argument correctly as a pointer to long integer (i.e. Long ByRef). Paginate and Paginate2 are otherwise identical.