Chapter 2

See Graphic.

Corel® WordPerfect® Product Commands
A


AbbreviationCreate

Purpose

Create an abbreviation.

Syntax

AbbreviationCreate (AbbreviationName: string; Template: enumeration; Text: string)

Parameters

AbbreviationName

string

Template

enumeration (optional)

CurrentDoc!

PersonalLibrary!

QuickWords!

SharedLibrary!

Text

string (optional)

See Also

AbbreviationDelete, AbbreviationExpand


AbbreviationDelete

Purpose

Delete an abbreviation.

Syntax

AbbreviationDelete (AbbreviationName: string; Template: enumeration)

Parameters

AbbreviationName

string

Template

enumeration (optional)

CurrentDoc!

PersonalLibrary!

QuickWords!

SharedLibrary!

See Also

AbbreviationCreate, AbbreviationExpand


AbbreviationDlg

Purpose

Display the Abbreviations dialog box.

Syntax

AbbreviationDlg ()

See Also

AbbreviationCreate, AbbreviationDelete, AbbreviationExpand, AbbreviationsShippingMacro


AbbreviationExpand

Purpose

Expand an abbreviation.

Syntax

AbbreviationExpand (AbbreviationName: string; Template: enumeration)

Parameters

AbbreviationName

string (optional)

Template

enumeration (optional)

CurrentDoc!

PersonalLibrary!

QuickWords!

SharedLibrary!

See Also

AbbreviationCreate, AbbreviationDelete, ExpandAllAbbrevShippingMacro


AbbreviationsShippingMacro

Purpose

Play the shipping macro ABBREV.WCM to display the Abbreviations dialog box in a modeless state. ABBREV.WCM must be installed.

Syntax

AbbreviationsShippingMacro ()


AboutDlg

Purpose

Display the About Corel WordPerfect dialog box, which displays product and license information.

Syntax

AboutDlg ()


AddressBookDlg

Purpose

Display the Address Book dialog box. You can also pre-select certain options using the parameters. If OK is clicked to dismiss the dialog, the Address Book will remember the currently selected addresses.

Syntax

boolean := AddressBookDlg (SelectionType: enumeration; CurrentSelections: enumeration; AddressBook: string; DialogTitle: string; OKButtonText: string)

Parameters

SelectionType

enumeration (optional) Default = SingleSelection!

MultipleSelection!

SingleSelection!

CurrentSelections

enumeration (optional) Default = Ignore!

Ignore!

Reselect!

AddressBook

string (optional) The name of the address book to view.

DialogTitle

string (optional) Change the text of the title bar.

OKButtonText

string (optional) Change the text of the OK button. Default = OK.

See Also

?AddressBookSelection, AddressBookInsertAddr, AddressBookSelectionGetField, AddressBookSelectionFormatAddr


AddressBookFormatAdd

Purpose

Create a custom address format and add it to the list of address formats.

Syntax

AddressBookFormatAdd (Name: string; Format: string)

Parameters

Name

string The name of the new custom format.

Format

string The address format string. Data fields are designated by enclosing the field code number in square brackets ([ ]). Use the Codes button on the Macro Bar to insert hard return or tab codes. Although the codes look like bracketed text, they are codes in the text string. For example:

AddressBookFormatAdd (Name: “Test”; Format: “[12289][HRt][14889][HRt][14887], [14888] [14890]”)

Use AddressBookGetFieldCount, AddressBookGetFieldNumber, and AddressBookGetFieldName to get the names and code numbers of the address book fields.

See Also

AddressBookFormatDelete, AddressBookGetFieldCount, AddressBookGetFieldName, AddressBookGetFieldNumber


AddressBookFormatDelete

Purpose

Delete a custom address format from the list of address formats. System (predefined) address formats cannot be deleted from the address format list.

Syntax

AddressBookFormatDelete (Name: string)

Parameters

Name

string The name of the custom format to delete.

See Also

AddressBookFormatAdd


AddressBookFormatGetCount

Purpose

Return the number of available address formats. Address formats can be referenced by index number to return information about the format. See AddressBookFormatGetName() and AddressBookFormatGetFormat(). Some address formats are provided with the program (predefined) and cannot be deleted. These formats are indexed one through the number of formats provided. User-defined address format indexes begin following the predefined formats and are indexed in order of creation.

For example, if there are five predefined address formats and four user-defined address formats, the predefined formats would have index numbers ranging from one to five, and the user-defined formats would have index numbers ranging from six to nine in the order which they were created. If a user-defined address format is deleted, the index number of each succeeding format is reduced by one.Therefore, the address format index numbers will always be sequential. Also, the index number of a user-defined address format may change if a previously created address format is deleted.

Syntax

numeric := AddressBookFormatGetCount ()

See Also

AddressBookFormatGetName, AddressBookFormatGetFormat


AddressBookFormatGetCurrent

Purpose

Return the format name or specification of the current address format.

Syntax

string := AddressBookFormatGetCurrent (Item: enumeration)

Parameters

Item

enumeration Specify the item to return.

Format!

Name!

See Also

AddressBookFormatAdd, AddressBookFormatGetFormat


AddressBookFormatGetFormat

Purpose

Return the specification of the address format specified in Index.

Syntax

string := AddressBookFormatGetFormat (Index: numeric)

Parameters

Index

numeric Use AddressBookFormatGetCount to determine the value of this parameter.

See Also

AddressBookFormatGetCurrent


AddressBookFormatGetName

Purpose

Return the name of the specified address format.

Syntax

string := AddressBookFormatGetName (Index: numeric)

Parameters

Index

numeric Use AddressBookFormatGetCount to determine the value of this parameter.

See Also

AddressBookFormatGetCurrent, AddressBookFormatGetCount


AddressBookGetCount

Purpose

Return the number of available address books.

Syntax

numeric := AddressBookGetCount ()

See Also

AddressBookFormatAdd, AddressBookGetFieldCount


AddressBookGetFieldCount

Purpose

Return the number of available fields in the specified address book.

Syntax

numeric := AddressBookGetFieldCount (AddressBook: string)

Parameters

AddressBook

string The name of the address book to get the field count from.

See Also

AddressBookFormatAdd, AddressBookGetName, AddressBookGetFieldNumber


AddressBookGetFieldName

Purpose

Return the name of a specific field in the specified address book.

Syntax

string := AddressBookGetFieldName (AddressBook: string; Index: numeric)

Parameters

AddressBook

string The name of the address book containing the desired field.

Index

numeric The index number of the desired field.

See Also

AddressBookFormatAdd, AddressBookGetName, AddressBookGetFieldCount


AddressBookGetFieldNumber

Purpose

Return the code number of a specific field in the address book specified. The field code number is not the same as the field index number. Field code numbers always remain the same even if other fields are deleted. The table below lists the default system (predefined) data fields and their code numbers. Custom Fields are numbered sequentially in the order they are created beginning at 32768.

Code #

Field Name

12289

Name

12290

E-Mail Type

12291

E-Mail Address

12292

Comments

14854

First Name

14856

Business Phone Number

14857

Home Phone Number

14865

Last Name

14870

Organization

14871

Title

14872

Department

14873

Mailstop

14874

Phone Number

14876

Cellular Phone Number

14883

Fax Number

14886

Country

14887

City

14888

State

14889

Address

14890

ZIP Code

24587

Greeting

Syntax

numeric := AddressBookGetFieldNumber (AddressBook: string; Index: numeric)

Parameters

AddressBook

string The name of the address book containing the desired field.

Index

numeric The index number of the desired field.

See Also

AddressBookFormatAdd, AddressBookGetName, AddressBookGetFieldCount, AddressBookGetFieldName


AddressBookGetName

Purpose

Return the name of the specified address book.

Syntax

string := AddressBookGetName (Index: numeric)

Parameters

Index

numeric The index number of the desired address book.

See Also

AddressBookGetCount


AddressBookInsertAddr

Purpose

Display the Corel Address Book dialog box so you can insert an address.

Syntax

AddressBookInsertAddr ()

See Also

AddressBookDlg


AddressBookRecordAddField

Purpose

Define a field value in a new address book record. Repeat for each field value defined. Precede with AddressBookRecordCreate and follow with AddressBookRecordEnd.

Syntax

AddressBookRecordAddField (Field: any; Value: string)

Parameters

Field

any The field name or code number.

Value

string The field value.

See Also

AddressBookRecordEnd, AddressBookRecordCreate


AddressBookRecordCreate

Purpose

Create a record in the specified address book. Follow with AddressBookRecordAddField and AddressBookRecordEnd.

Syntax

AddressBookRecordCreate (AddressBook: string)

Parameters

AddressBook

string The name of the address book the new record will be added to.

See Also

AddressBookRecordEnd, AddressBookRecordAddField


AddressBookRecordEnd

Purpose

End the record creation process and save the new record. Precede with AddressBookRecordCreate and AddressBookRecordAddField.

Syntax

AddressBookRecordEnd (State: enumeration; RecordType: enumeration)

Parameters

State

enumeration Save the new record to the specified address book or cancel without saving.

Cancel!

Save!

RecordType

enumeration (optional) Specify the type of the new record. Default: Person!

Organization!

Person!

See Also

AddressBookRecordCreate, AddressBookRecordAddField


AddressBookSelectionFormatAddr

Purpose

Return the address that was last selected in the address book and formats it using the specified address format.

Syntax

string := AddressBookSelectionFormatAddr (Format: string; Index: numeric)

Parameters

Format

string The format specification used to format the specified address. You can use AddressBookFormatGetFormat or AddressBookFormatGetCurrent to retrieve an address format specification.

Index

numeric (optional) The index number of the desired address record relative to the current selection. For example, if six address records were selected and you wanted the second record in the list, you would put 2 in this parameter. If this parameter is not included, the first record in the list will be formatted.

See Also

AddressBookDlg, PersonalInfoFormatAddr


AddressBookSelectionGetField

Purpose

Return the value of a field from the last address book record that was selected. Use the Index parameter if the last selection was a multiple record selection.

Syntax

string := AddressBookSelectionGetField (Field: any; Index: numeric)

Parameters

Field

any Specify the field to retrieve. If this parameter is a number, the command will try to locate the field with that code number. If this parameter is a string, the command will try to locate the field with that name.

Index

numeric (optional) Specify the record to retrieve the field information from. Use this parameter when the last address book selection was a multiple record selection. For example, to return information from the fifth record of a multiple record selection, set this parameter to 5. If the last selection was a multiple record selection and this parameter is left blank, the command will return information from the first record in the selection.

See Also

AddressBookDlg, PersonalInfoGetField


AddressMergeShippingMacro

Purpose

Play the shipping macro ADRS2MRG.WCM to copy the address book into a merge data file. ADRS2MRG.WCM must be installed.

Syntax

AddressMergeShippingMacro ()


Advance

Purpose

Move the insertion point a specified distance from the top or left of the page, or from the insertion point.

Syntax

Advance (Where: enumeration; Amount: measurement)

Parameters

Where

enumeration

AdvanceDown!

AdvanceFromLeftEdge!

AdvanceFromTop!

AdvanceLeft!

AdvanceRight!

AdvanceUp!

Down!

Left!

Right!

ToLine!

ToPosition!

Up!

Amount

measurement

See Also

AdvanceDlg, BaselinePlacement, Binding, MarginAdjustLeft, MarginAdjustRight


AdvanceDlg

Purpose

Display the Advance dialog box.

Syntax

AdvanceDlg ()

See Also

Advance


AllFontsShippingMacro

Purpose

Play the shipping macro ALLFONTS.WCM to create a list of available fonts for the current printer. ALLFONTS.WCM must be installed.

Syntax

AllFontsShippingMacro ()


Append

Purpose

Add a copy of the selected text or graphics to the end of the Clipboard contents. If the Clipboard is empty, the macro ends.

Syntax

Append ()

See Also

AppendToFile, ClipboardAppendTo, ClipboardSaveTo, DeleteAppend, EditCopy, EditCut


AppendToFile

Purpose

Add the selected text, or the current document if no text is selected, to the end of another file.

Syntax

AppendToFile (Filename: string)

Parameters

Filename

string (optional) The file to append to.

See Also

Append, ClipboardAppendTo


ApplicationBarShow

Purpose

Display (On!) or hide (Off!) the Application Bar. If no parameter is specified, this command toggles the Application Bar display.

Syntax

ApplicationBarShow (State: enumeration)

Parameters

State

enumeration (optional)

Off!

On!


AppMaximize

Purpose

Maximize the application window. If the window is already maximized, the macro ends.

Syntax

AppMaximize ()

See Also

AppMinimize, AppRestore, DocMaximize, DocMinimize


AppMinimize

Purpose

Minimize the application window to an icon. If the window is already minimized, the macro ends.

Syntax

AppMinimize ()

See Also

AppMaximize, AppRestore, DocMaximize, DocMinimize


AppMove

Purpose

Reposition an application window that has been reduced in size. If Corel WordPerfect is maximized, the macro ends or goes to the ONERROR label.

Syntax

AppMove ()

See Also

DocMove


AppRestore

Purpose

Restore the application window to its previous size. If Corel WordPerfect is already restored, the macro ends or goes to the ONERROR label.

Syntax

AppRestore ()

See Also

AppMaximize, AppMinimize, DocRestore


AppSize

Purpose

Resize the current application window. If the window is maximized, the macro ends or goes to the ONERROR label.

Syntax

AppSize ()

See Also

DocSize


AppTaskList

Purpose

Activate the Taskbar and display the Start menu.

Syntax

AppTaskList ()


AssociateDlg

Purpose

Display the Associate dialog box, which allows you to assign menus, toolbars, and keyboards to selected features.

Syntax

AssociateDlg ()

See Also

MergeFileAssociate, TemplateSetAssociation


AttributeAppearanceOff

Purpose

Turn off the specified attributes at the insertion point. One or more attribute parameters is required.

Syntax

AttributeAppearanceOff ({Attrib: enumeration; })

Parameters

Attrib

enumeration (optional)

Bold!

DoubleUnderline!

Every!

Italics!

Outline!

Redline!

Shadow!

SmallCaps!

Strikeout!

Underline!

See Also

AttributeAppearanceOn, AttributeAppearanceToggle, AttributeNormal, AttributeRelativeSize, AttributeRelativeSizeToggle, AttributeSizeRatios


AttributeAppearanceOn

Purpose

Turn on the specified attributes at the insertion point. One or more parameters is required.

Syntax

AttributeAppearanceOn ({Attrib: enumeration; })

Parameters

Attrib

enumeration (optional)

Bold!

DoubleUnderline!

Every!

Italics!

Outline!

Redline!

Shadow!

SmallCaps!

Strikeout!

Underline!

See Also

AttributeAppearanceOff, AttributeAppearanceToggle, AttributeNormal, AttributeRelativeSize, AttributeRelativeSizeToggle


AttributeAppearanceToggle

Purpose

Toggle attributes, usually of the selected text. One or more attribute parameters is required.

Syntax

AttributeAppearanceToggle ({Attrib: enumeration; })

Parameters

Attrib

enumeration (optional)

Bold!

DoubleUnderline!

Every!

Italics!

Outline!

Redline!

Shadow!

SmallCaps!

Strikeout!

Underline!

See Also

AttributeAppearanceOn, AttributeAppearanceOff, AttributeNormal, AttributeRelativeSize, AttributeRelativeSizeToggle


AttributeNormal

Purpose

Turn off the current font attributes except color. To record, first add an Attribute Normal button to a toolbar in Settings.

Syntax

AttributeNormal ()

See Also

AttributeAppearanceOn, AttributeAppearanceOff, AttributeRelativeSize, AttributeRelativeSizeToggle


AttributePosition

Purpose

Specify subscript or superscript font attributes.

Syntax

AttributePosition (Position: enumeration)

Parameters

Position

enumeration

NormalPosition!

Subscript!

Superscript!

See Also

AttributeNormal, AttributePositionToggle, AttributeSizeRatios, FontSubscriptToggle, FontSuperscriptToggle


AttributePositionToggle

Purpose

Toggle subscript, normal, and superscript font attributes.

Syntax

AttributePositionToggle (Position: enumeration)

Parameters

Position

enumeration

NormalPosition!

Subscript!

Superscript!

See Also

AttributeNormal, AttributePosition, FontSubscriptToggle, FontSuperscriptToggle


AttributeRelativeSize

Purpose

Specify a relative font size for selected or subsequent text.

Syntax

AttributeRelativeSize (Size: enumeration)

Parameters

Size

enumeration

ExtraLarge!

Fine!

Large!

NormalSize!

Small!

VeryLarge!

See Also

AttributeRelativeSizeToggle


AttributeRelativeSizeToggle

Purpose

Toggle relative font sizes.

Syntax

AttributeRelativeSizeToggle (Size: enumeration)

Parameters

Size

enumeration

ExtraLarge!

Fine!

Large!

NormalSize!

Small!

VeryLarge!

See Also

AttributeRelativeSize


AttributeSizeRatios

Purpose

Specify relative font size ratios.

Syntax

AttributeSizeRatios (Attrib: enumeration; Percentage: numeric)

Parameters

Attrib

enumeration

ExtraLarge!

Fine!

Large!

Small!

SuperSubscript!

VeryLarge!

Percentage

numeric

See Also

AttributeRelativeSize, AttributeRelativeSizeToggle


AutoCodePlacement

Purpose

Turn automatic code placement on or off. Default: Some codes are automatically placed at the beginning of a page or paragraph. When off, all codes are inserted at the insertion point. Not recordable.

Syntax

AutoCodePlacement (State: enumeration)

Parameters

State

enumeration

Off!

On!


AutoWordSelect

Purpose

Turn Automatically Select Words on or off. Changes the current Corel WordPerfect session only.

Syntax

AutoWordSelect (State: enumeration)

Parameters

State

enumeration

No!

Yes!

See Also

?AutoWordSelect