What You Need to Know
Before using the Word API, you should know the basics of creating a DLL (Windows) or a code resource (Macintosh). You should also be familiar with Word and the WordBasic macro language.
Requirements
Windows 3.x, Windows 95, or Windows NT
To develop WLLs in Windows 3.x, Windows 95, or Windows NT, you need the following:
- Microsoft Word Developer's Kit
- Microsoft Word version 6.0 for Windows or Windows NT, or Word version 7.0
- Microsoft Windows version 3.1 or later, Microsoft Windows 95, or Microsoft Windows NT version 3.5 or later
- A compiler that can produce Windows-compatible DLL files (for example, Microsoft Visual C++)
Macintosh
To develop WLLs on the Macintosh, you need the following:
- Microsoft Word Developer's Kit
- Microsoft Word version 6.0 or later for the Macintosh
- Apple Macintosh System 7.0 or later
- A compiler that can produce Macintosh code resources (for example, Symantec THINK C)
Installation
The files necessary to build WLLs are located in the CAPI folder on the Microsoft Word Developer's Kit disk. Within the CAPI folder, the SAMPLE subfolder contains the files needed to build a sample WLL in Visual C++ (Windows) or Symantec THINK C (Macintosh). This sample code provides a good starting point for developing your own WLLs.
Windows, Windows 95, or Windows NT
From the Microsoft Word Developer's Kit disk, copy the entire CAPI subfolder to an appropriate location in your compiler folder structure. The CAPI subfolder contains the following files, which need to be available to each WLL project you create:
- CAPILIB.C, a collection of helper functions described in the section "Using the CAPILIB Functions" later in this appendix
- CAPILIB.H, the header file defining the CAPILIB functions
- WDCAPI.H, the header file defining the functions, data structures, and constants needed to program WLLs
- CONFIG.H, the header file required to compile WLLs correctly on either 16-bit or 32-bit platforms
- WDCMDS.H, the header file defining all of the Word commands and functions available through the Word API
- WDERROR.H, the header file defining the Word API error codes returned by Word
- WDFID.H, the header file defining all of the arguments taken by the Word commands listed in WDCMDS.H
Macintosh
From the Microsoft Word Developer's Kit disk, drag the CAPI folder to an appropriate location in your compiler folder. The CAPI folder contains files similar to those described for the Windows disk; these files need to be available to each WLL project you create.