WordPerfect

5.1, 5.2+ & 7C

Developer's Toolkit

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

WordPerfect® is a registered trademark of Corel Corporation Limited within the United States and other countries. All other brand and product names are trademarks or registered trademarks of their respective companies.

Corel® Corporation Limited 1996

All Rights Reserved.

Corel Applications Group

567 East Timpanogos Parkway

Orem, UT 84057-2399 U.S.A.

Telephone: (800)-77-COREL

Disclaimer

Please read carefully before using the Corel Corp. Developer's Toolkit

Corel Corporation Limited ("Corel") is pleased to provide you with this Software Developer's Toolkit ("Toolkit"). It is Corel's intention in designing the Toolkit to make it compatible with previous versions of the Toolkit. However, since it is constantly being modified and reorganized, with certain capabilities added to, or eliminated from, any particular version or product, Corel makes no representations or warranties concerning compatibility with other versions or products.

You are solely responsible for determining the usefulness of the Toolkit for your particular purpose. The Toolkit is provided to software developers with the expectation that the developers are capable of writing and debugging their own programs; Corel does not assume any support obligations with respect to the Toolkit or the use thereof. Any research, development, or evaluation you perform is done entirely at your own risk.

Table of Contents

Disclaimer	i

Overview	iv

Intended Audience	v

Information, Customer Services and Support	vi

WordPerfect

WordPerfect 5.1 Document Format	2

Prefix Area	4

Additional Prefix Area	8

WordPerfect Packet Types	11

Document Area	22

Control Characters	24

ASCII Characters	25

Single-Byte Functions	27

Fixed-Length, Multi-Byte Functions	28

Variable-Length, Multi-Byte Functions	33

Font Group	38

Definition Group	40

Set Group	54

Format Group	62

Header/Footer Group	68

Footnote/Endnote Group	70

Generate Group	72

Display Group	78

Miscellaneous Group	82

Box Group	83

Style Group	89

Table End of Line Codes Group	92

Table End of Page Codes Group	97

Enhanced Merge Command Codes Group	98

Equation Nested Function Group	101

Tag Group	102

.WPM Macro File Formats for DOS, VAX, UNIX	106

Control Characters	109

Macro Commands	112

Detection of WordPerfect 4.2 Files by WP 5.0 and WP 5.1	115

Importing Lotus Files into WordPerfect	117

WordPerfect Font Procedure	118

UNIX Third-Party Interface

Introduction	123

WordPerfect Keys	129

WordPerfect Commands	133

WordPerfect Dialog Commands	135

WordPerfect Token Commands	140

Macro Commands	145

Display Control Characters (Character Version Only)	147

Tokens and their Parameter Formats	149

Appendixes

Appendix A: WordPerfect .SET File Packets	177

Appendix B: .WPK Keyboard Macro File Formats	190

Appendix C: Screen Font Files	192

Appendix D: General Font Terms	196

Appendix E: Hex Chart	197

Index

Index	199

Overview

This document contains information about the structure and format of WordPerfect. It includes information about file formats of Corel Corporation products, such as graphic device driver files and macro files. This information is intended to help developers, programmers, or users who need to know about the internal structure of these files. Information is also provided to help application programmers develop third-party programs that need to interface with Corel Corporation products. This document is subject to change without notice.

Intended Audience

The information in this document is intended for anyone who needs to develop programs or create files that share information with Corel Corporation products. The information contained in this document is not confidential; however, the Corel Corporation programs themselves are copyrighted, so do not under any circumstances modify or tamper with these programs.

This information will help you do the following:

Convert files or data from some other source into WordPerfect 5.0/5.1 for DOS and WordPerfect 5.1/5.2 for Windows compatible documents.

Develop add-on programs that work with WordPerfect.

Write device drivers to allow WordPerfect to work with a particular hardware (such as a printer or screen display).

Extract information from WordPerfect files to use with other programs.

Information, Customer Services and Support

Corel Solution Partners Information

For more information on Corel Solution Partners program, visit our web site at www.corel.com or call (801) 765-4150. To apply, the online application is located at our web site under the Partners and Developers section.

Mail	Phone	Fax

Corel	(801) 765-4150	(801) 765-4156

Corel Solution Partners

MS G253

567 East Timpanogos Parkway

Orem, UT 84057

Corel Product Information

Questions concerning purchase of Corel products can be directed to the Sales Center at 1-800-77- COREL. For information about Software Developer's Kits, see the phone numbers below.

Developer Support

For both pre- and post-sale technical support, you may contact Corel Developer Support.

Voice	Fax	E-mail

(801) 765-4151	(801) 765-4156	devsup@corel.com

U.S. and Canada	U.S. and Canada	Messages receive a

response within 24 hours.

Many calls to Corel Developer Support are passed to a software support engineer immediately. Calls to Corel Developer Support generally will be acknowledged or answered within four hours. At some point in the future, there will be a charge associated with most developer phone support.