Insert a code to display the current date at the insertion point. The date code updates to the system date when the document is retrieved or reformatted.
DateFormat
Syntax
DateFormat(DateFormatString As String)
Description
Specify a date format, and insert the Date Fmt code at the insertion point.
Parameters
DateFormatString: string A combination of text characters, date, and/or time codes. Select date and time codes from the Macro Codes dialog. Click Codes on the Macro Bar to display the Macro Codes dialog.
DateFormatDlg
Syntax
DateFormatDlg()
Description
Display the Document Date/Time Format dialog box.
Example
In the following example, the code will execute when the user clicks the 'Date' Command button. This code will produce the Date dialog box.
Private Sub CommandButtonDate_Click()
'******* Declare Object
Dim PS as PerfectScript
'****** Allocate memory to the object
Set PS = new PerfectScript
'***** Call the datye format dialog box
PS.DateFormatDlg
End Sub
DateText
Syntax
DateText()
Description
Insert the system date as text at the insertion point.
DDEChangeUpdateMode
Syntax
DDEChangeUpdateMode(LiInkName As String, [UpdateMode As _DDEChangeUpdateMode_UpdateMode_enum])
Description
Specify a manual or automatic DDE link update method.
Parameters
LinkName: string The name of the link to update.
UpdateMode: enumeration (optional) Automatic!
Manual!
DDECreateLink
Syntax
DDECreateLink(LinkName As String, Source As String, [UpdateMode As _DDECreateLink_UpdateMode_enum], [Format As _DDECreateLink_Format_enum])
Description
Establish a link between a WordPerfect document and a file in another application. Data changes in the source file are automatically made in the WordPerfect document.
Parameters
LinkName: string The name of the link you want to create.
Source: string The application, file, and optionally, an item within the file that is linked to a WordPerfect document. Separate the application and filename with a vertical bar (|). If an item (a section of a file) is specified, separate the item from the file name with a second vertical bar.
UpdateMode: enumeration (optional) Manual!
Automatic!
Format: enumeration (optional) WP6DOC!
WPDOC!
WP6TEXT!
WPG2!
RTF!
TEXT!
OEMTEXT!
METAFILE!
WB1!
WP7DOC!
WP7TEXT!
WP8DOC!
WP8TEXT!
WP9DOC!
WP9TEXT!
DDECreateLinkDlg
Syntax
DDECreateLinkDlg()
Description
Display the Links dialog box.
DDEDeleteLink
Syntax
DDEDeleteLink([LinkName])
Description
Remove a DDE link.
Parameters
LinkName: string(optional)
DDEDeleteLinkDlg
Syntax
DDEDeleteLinkDlg()
Description
Display the Links dialog box.
DDEEditLink
Syntax
DDEEditLink(LinkName As String, [NewName As String], [NewSource As String])
Description
Change the properties of a DDE link.
Parameters
LinkName: string The original name of the link.
NewName: string (optional) The new name for the link.
NewSource: string (optional) The new source application for the link.
DDEEditLinkDlg
Syntax
DDEEditLinkDlg()
Description
Display the Change Links dialog box.
DDEPasteLink
Syntax
DDEPasteLink([Format As _DDEPasteLink_Format_enum])
Description
Establish a link between a WordPerfect document and a file in another application. Data changes in the source file are automatically made in the WordPerfect document. After copying a selection in another application to the Clipboard, use DDEPasteLink to link it to a WordPerfect document.
Parameters
Format: enumeration (optional) WP6DOC!
WPDOC!
WP6TEXT!
WPG2!
RTF!
TEXT!
OEMTEXT!
METAFILE!
WB1!
WP7DOC!
WP7TEXT!
WP8DOC!
WP8TEXT!
WP9DOC!
WP9TEXT!
DDEUpdateLink
Syntax
DDEUpdateLink([LinkName])
Description
Update a specified DDE link. If the optional LinkName parameter is left off, all links in the current document are updated.
Parameters
LinkName: string (optional) The name of the link to update.
DDEUpdateLinkDlg
Syntax
DDEUpdateLinkDlg()
Description
Display the Links dialog box.
DecimalAlignmentCharacter
Syntax
DecimalAlignmentCharacter([Character As String]) As String
Description
Specify the ASCII numeric equivalent of a decimal character.
Parameters
Character: string The decimal separator character.
DelayCodes
Syntax
DelayCodes(PagesToDelay As Integer)
Description
Postpone the effects of codes for one or more pages.
Parameters
PagesToDelay: numeric
DelayCodesDlg
Syntax
DelayCodesDlg()
Description
Display the Delay Codes dialog box.
DeleteAppend
Syntax
DeleteAppend()
Description
Delete a selection and append it to the Clipboard.
DeleteCharNext
Syntax
DeleteCharNext()
Description
Delete the character to the right of the insertion point.
DeleteCharPrevious
Syntax
DeleteCharPrevious()
Description
Delete the character to the left of the insertion point.
DeleteToBeginningOfWord
Syntax
DeleteToBeginningOfWord()
Description
Delete the text and codes from the insertion point to the beginning of the current word. The insertion point must be in a word.
DeleteToEndOfLine
Syntax
DeleteToEndOfLine()
Description
Delete the text and codes from the insertion point to the end of the current line. Does not delete hard returns or hard page breaks.
DeleteToEndOfPage
Syntax
DeleteToEndOfPage()
Description
Delete the text and codes from the insertion point to the end of the current page. Does not delete hard page breaks.
DeleteToEndOfWord
Syntax
DeleteToEndOfWord()
Description
Delete the text and codes from the insertion point to the end of the current word.
DeleteWord
Syntax
DeleteWord()
Description
Delete the current word or space.
DirectoryCreate
Syntax
DirectoryCreate(Directory As String)
Description
Create a new directory.
Parameters
Directory: string The path and directory name.
Note It is more efficient to use the common dialog control.DirectoryExists
Syntax
DirectoryExists(Variable, Directory As String)
Description
Return whether a specified directory exists.
Parameters
Variable: variable True or False.
Directory: string The name and path of the directory.
Display
Syntax
Display([State As _Display_State_enum]) As Boolean
Description
Display macro execution when a macro is played. A macro runs faster with display off. A "Macro Play" message appears on the Application Bar.
Return Value
Returns True if display is on, False if not. If the State parameter is omitted, its current value is returned. If it is included, the current value is returned, then the new value is set.
Parameters
State: enumeration Off!
On!
DisplayMode
Syntax
DisplayMode(DisplayMode As _DisplayMode_DisplayMode_enum)
Description
Display the current document in Draft or Page mode. Included for DOS compatibility. DOS enumerations do not correspond exactly with WordPerfect 8 View options. Text! and Graphics! specify Draft mode, and FullPage! specifies Page mode. Recordable substitutes: ViewDraft, ViewPage, and ViewTwoPage.
Parameters
DisplayMode: enumeration Text!
Graphics!
FullPage!
WebPage!
DisplaySuppressedBoxes
Syntax
DisplaySuppressedBoxes([State As _DisplaySuppressedBoxes_State_enum]) As Boolean
Description
Lets you specify whether or not you want to display suppressed boxes.
Parameters
State: enumeration No!
Yes!
DisplayZoom
Syntax
DisplayZoom(Percent As Integer)
Description
Specify the current zoom setting.
Parameters
Percent: numeric Percent: 25-400.
Example
In the following example the document zoom is set to 150. The PS object references the PerfectScript object.
Private Sub CommandButtonZoom_Click()
'******* Declare the PerfectScript object
Dim PS as PerfectScript
'******* Allocate memory to the PerfectScript object
Lets you specify the options for the DocCompare method.
Parameters
Precision: enumeration (optional) Character!
Word!
SkipChars: string (optional)
CmpHdrsFtrs: enumeration (optional) No!
Yes!
CmpComments: enumeration (optional) No!
Yes!
ExpandMstrDocs: enumeration (optional) No!
Yes!
SummaryOfCmp: enumeration (optional) None!
AtBeginning!
AtEnd!
ListOfChanges: enumeration (optional) None!
ShowChgOnly!
ShowContext!
InsertionBoldAttr: enumeration (optional) Off!
On!
InsertionItalicAttr: enumeration (optional) Off!
On!
InsertionUndAttr enumeration (optional) Off!
On!
InsertionDUndAttr enumeration (optional) Off!
On!
InsertionRedlineAttr enumeration (optional) Off!
On!
InsColorRed: numeric (optional)
InsColorGreen: numeric (optional)
InsColorBlue: numeric (optional)
EncloseInsWith enumeration (optional) None!
Brackets!
Braces!
Bkslashes!
Quotes!
GTLT!
DeletionBoldAttr enumeration (optional) Off!
On!
DeletionUndAttr enumeration (optional) Off!
On!
DeletionDUndAttr enumeration (optional) Off!
On!
DeletionRedlineAttr enumeration (optional) Off!
On!
DeletionStkoutAttr enumeration (optional) Off!
On!
DelColorRed: numeric (optional)
DelColorGreen: numeric (optional)
DelColorBlue: numeric (optional)
EncloseDelWith enumeration (optional) None!
Brackets!
Braces!
Bkslashes!
Quotes!
GTLT!
ShowDelTextAs enumeration (optional) FullText!
AbbrevText!
NoText!
Character!
DelTextChar: string (optional)
ShowMoves enumeration (optional) NotShown!
AtNewLoc!
AtBothLocs!
MoveColorRed: numeric (optional)
MoveColorGreen: numeric (optional)
MoveColorBlue: numeric (optional)
ReviewOpt enumeration (optional) CompareOnly!
CompareThenReview!
DocCompareRemoveMarkingsDlg
Syntax
DocCompareRemoveMarkingsDlg()
Description
Display the Remove Markings dialog box.
DocCompareRemoveRedline
Syntax
DocCompareRemoveRedline(flag As _DocCompareRemoveRedline_Flag_enum)
Description
Remove Strikeout and Redline codes and Strikeout text, or remove only Strikeout codes and text.
Parameters
Flag: enumeration LeaveRedline!
RemoveAll!
DocInitialFont
Syntax
DocInitialFont(Name As String, [PointSize As Integer], [Family As _DocInitialFont_Family_enum], [Attributes As _DocInitialFont_Attributes_enum], [Weight As _DocInitialFont_Weight_enum], [Width As _DocInitialFont_Width_enum], [Source As _DocInitialFont_Source_enum], [Type As _DocInitialFont_Type_enum], [CharacterSet As _DocInitialFont_CharacterSet_enum])
Description
Set the default font for the current document.
Parameters
Name: string The font face for the document.
PointSize: measurement (optional) The font size for the document.
Maximize the current document window. If the document is already maximized, the macro ends or goes to the ONERROR label.
DocMinimize
Syntax
DocMinimize()
Description
Minimize the current document window. If the document is already minimized, the macro ends or goes to the ONERROR label.
DocMove
Syntax
DocMove()
Description
Reposition or resize the current document if the application window has been minimized.
DocNext
Syntax
DocNext()
Description
Move the current document to the back and the most recently opened document to the front.
DocPrevious
Syntax
DocPrevious()
Description
Activate the previous document window, if the document is still open.
DocRedlineMethodDlg
Syntax
DocRedlineMethodDlg()
Description
Display the Redline dialog box.
DocRestore
Syntax
DocRestore()
Description
Restore the current document to the size it was before it was minimized or maximized. If the document is already restored, the macro ends or goes to the ONERROR label.
DocSize
Syntax
DocSize()
Description
Move or resize the current minimized document window. If the window is maximized, an error is displayed and the macro ends or goes to the ONERROR label.
DocSummaryConfig
Syntax
DocSummaryConfig([DocSumFieldName])
Description
Specify the fields to include in the current document summary.
Parameters
DocSumFieldName: enumeration (optional) Repeat the parameter for as many fields as need to be specified. Enclose repeating parameters in braces ({}) and separate with semi-colons.
Abstract!
Account!
Address!
Attachments!
Author!
Authorization!
BillTo!
BlindCopy!
CarbonCopy!
Category!
CheckedBy!
Client!
Comments!
CreationDate!
DateCompleted!
Department!
DescriptiveName!
DescriptiveType!
Destination!
Disposition!
Division!
DocumentNumber!
Editor!
ForwardTo!
Group!
Keywords!
Language!
MailStop!
Matter!
Office!
Owner!
Project!
Publisher!
Purpose!
ReceivedFrom!
RecordedBy!
RecordedDate!
Reference!
RevisionDate!
RevisionNotes!
RevisionNumber!
Section!
Security!
Source!
Status!
Subject!
TelephoneNumber!
Typist!
VersionDate!
VersionNotes!
VersionNumber!
DocSummaryDelete
Syntax
DocSummaryDelete()
Description
Delete the current document summary information.
DocSummaryPrint
Syntax
DocSummaryPrint()
Description
Print the current document summary.
DocSummarySaveAs
Syntax
DocSummarySaveAs(Filename As String, [ExportType As _DocSummarySaveAs_ExportType_enum], [AppendReplace As _DocSummarySaveAs_AppendReplace_enum])
Description
Save the current document summary with a filename.
Parameters
Filename: string The filename under which to save the document summary.
ExportType: enumeration (optional) AmiPro_10!
AmiPro_12!
AmiPro_12A!
AmiPro_12B!
AmiPro_30!
ANSIDelimitedTextWindows!
ANSIGenericWordProcessor_Windows!
ANSIText_Windows!
ASCIIStandard!
ASCIIStripped!
DelimitedText!
DisplayWrite_40!
DisplayWrite_42!
DisplayWrite_50!
Excel_40!
FFT!
Kermit_7bit_Transfer!
MicroSoftWord_40!
MicroSoftWord_50!
MicroSoftWord_55!
MultiMate_33!
MultiMate_40!
MultiMateAdvantage_36!
MultiMateAdvantageII_10!
NavyDIF!
OfficeWriter_60!
OfficeWriter_61!
OfficeWriter_611!
OfficeWriter_62!
RFT!
RTF!
RTFJ!
WindowsWrite!
WordForWindows_10!
WordForWindows_11!
WordForWindows_12!
WordForWindows_1A!
WordForWindows_20!
WordForWindows_20a!
WordForWindows_20b!
WordForWindows_50!
WordPerfect_42!
WordPerfect_50!
WordPerfect_51!
WordPerfect_5xA!
WordPerfect_60!
WordPerfect_7!
WordStar_33!
WordStar_331!
WordStar_34!
WordStar_40!
WordStar_50!
WordStar_55!
WordStar_60!
WordStar2000_10!
WordStar2000_20!
WordStar2000_30!
XyWriteIIIPlus_355!
XyWriteIIIPlus_356!
AppendReplace: enumeration (optional) Append!
Replace!
DocSumSet
Syntax
DocSumSet([DocSumFieldName], [DocSumFieldData])
Description
Modify the data of the specified document-summary field. Repeat both parameters for each field of the summary. Enclose repeating parameters in braces ({}).
Parameters
DocSumFieldName: enumeration (optional) The fields to modify.
Abstract!
Account!
Address!
Attachments!
Author!
Authorization!
BillTo!
BlindCopy!
CarbonCopy!
Category!
CheckedBy!
Client!
Comments!
CreationDate!
DateCompleted!
Department!
DescriptiveName!
DescriptiveType!
Destination!
Disposition!
Division!
DocumentNumber!
Editor!
ForwardTo!
Group!
Keywords!
Language!
MailStop!
Matter!
Office!
Owner!
Project!
Publisher!
Purpose!
ReceivedFrom!
RecordedBy!
RecordedDate!
Reference!
RevisionNotes!
RevisionNumber!
Section!
Security!
Source!
Status!
Subject!
TelephoneNumber!
Typist!
VersionDate!
VersionNotes!
VersionNumber!
DocSumFieldData: string (optional) The data for a document-summary field. If CreationDate!, DateCompleted!, RecordedDate!, RevisionDate!, or VersionDate! is specified in the DocSumFieldName parameter, the date must be entered in the sequence of Year, Month, Day. For example: "1994, 9, 14." If the date format is incorrect, the specified date field is not updated.
DocumentCompare
Syntax
DocumentCompare(Filename As String, MarkIn As _DocumentCompare_MarkIn_enum)
Description
Compare two versions of a document and mark differences.
Parameters
Filename: string
The document you want to compare.
MarkIn:
enumeration NewDoc!
CurrentDoc!
DotLeader
Syntax
DotLeader(Character As String, SpaceCount As Integer)
Description
Specify the ASCII number of a dot leader character, and the number of spaces between each character.
Parameters
Character: string The ASCII number of a dot leader character.
SpaceCount: numeric The number of spaces between the visible dot leader characters.
DoubleSidedPrint
Syntax
DoubleSidedPrint(Flags As _DoubleSidedPrint_Flags_enum)
Description
Turn double-sided printing (Duplex) on or off, and specify a binding edge. This method inserts a code in the document at the beginning of the current page.
Parameters
Flags: enumeration LongEdge!
None!
ShortEdge!
DoubleSmartQuote
Syntax
DoubleSmartQuote([State As _DoubleSmartQuote_State_enum], [OpenDoubleQuote As Integer], [CloseDoubleQuote As Integer])
Description
Turn Double SmartQuotes on or off and specify a quote character.
Parameters
State: enumeration (optional) Off!
On!
OpenDoubleQuote: numeric (optional) The numeric equivalent of the quote character.
CloseDoubleQuote: numeric (optional) The numeric equivalent of the quote character.
DraftZoom100
Syntax
DraftZoom100()
Description
Display Draft view with screen text and graphics at 100%. Draft view does not display headers, footers, or other substructures.
DraftZoomMargin
Syntax
DraftZoomMargin()
Description
Display Draft view with screen text and graphics reaching the margins. Draft view does not display headers, footers, and other substructures.
DropCapAdjustDlg
Syntax
DropCapAdjustDlg()
Description
Display the Drop Cap Options dialog box.
DropCapBegin
Syntax
DropCapBegin()
Description
Begin a drop cap. Follow with drop cap editing methods and DropCapEnd().
DropCapBorderFillDlg
Syntax
DropCapBorderFillDlg()
Description
Display the Drop Cap Border/Fill dialog box.
DropCapBorderStyle
Syntax
DropCapBorderStyle(BorderStyleName)
Description
Specify a drop cap border style. Use with DropCapBegin() and DropCapEnd(). You must pass the numeric value of the BorderStyleName.
Parameters
BorderStyleName: any Enclose custom styles in quotation marks.
ButtonBorder!
ColumnBorderAll!
ColumnBorderBetween!
DashedBorder!
DottedBorder!
DoubleBorder!
ExtraThickBorder!
HeavyDoubleBorder!
HeavySingleBorder!
NoBorder!
SingleBorder!
SpacingOnly!
ThickBorder!
ThickThinBorder!
ThickTopBottomBorder!
ThinThickBorder!
10
12
11
3
4
2
6
14
13
127
1
0
5
8
9
7
Example
In the following example, a drop cap is added. The border style used is 'ThickBorder', therefore the value 5 must be passed. The PS object is the PerfectScipt object.
'***** Declare the PerfectScript object
Dim PS as PerfectScript
'***** Allocate memory to the PerfectScript object
Set PS = new PerfectScript
'***** Begin Drop Cap
PS.DropCapBegin
PS.DropCapCharacters 1
PS.DropCapCharacterSize 2
'****** Set the border style
PS.DropCapBorderStyle 5
'***** End Drop Cap
PS.DropCapEnd Save_DropCapEnd_State
DropCapCharacters
Syntax
DropCapCharacters(Number As Integer)
Description
Specify the number of characters in a drop cap.
Parameters
Number: numeric The number of characters included in a drop cap.
Example
In the following code fragment, one character has been specified for the drop cap. The PS object is the PerfectScript object.
'***** Declare the PerfectScript object
Dim PS as PerfectScript
'***** Allocate memory to the PerfectScript object
Set PS = new PerfectScript
'***** Begin Drop Cap
PS.DropCapBegin
PS.DropCapCharacters 1
PS.DropCapCharacterSize 2
'****** Set the border style
PS.DropCapBorderStyle 5
'***** End Drop Cap
PS.DropCapEnd Save_DropCapEnd_State
DropCapCharacterSize
Syntax
DropCapCharacterSize(Size As Double)
Description
Specify the size of a drop cap character(s). You should experiment to find the value that meets you needs.
Parameters
Size: numeric The point size of the character(s) in a drop cap.
Example
In the following code fragment, the point size of the character used in the drop cap is 2. The PS object is the PerfectScript object.
'***** Declare the PerfectScript object
Dim PS as PerfectScript
'***** Allocate memory to the PerfectScript object
Set PS = new PerfectScript
'***** Begin Drop Cap
PS.DropCapBegin
PS.DropCapCharacters 1
PS.DropCapCharacterSize 2
PS.DropCapFillStyle 4
'****** Set the border style
PS.DropCapBorderStyle 5
'***** End Drop Cap
PS.DropCapEnd Save_DropCapEnd_State
DropCapContourWrap
Syntax
DropCapContourWrap(State)
Description
Wrap text around a drop cap.
Parameters
State: any No!
Yes!
DropCapControlBar
Syntax
DropCapControlBar()
Description
Display the Drop Cap feature bar.
DropCapEnd
Syntax
DropCapEnd(State As _DropCapEnd_State_enum)
Description
End a drop cap and save the changes. Precede with DropCapBegin() and drop cap editing methods.
Parameters
State: enumeration Cancel!
Save!
DropCapFillStyle
Syntax
DropCapFillStyle(FillStyleName)
Description
Specify a drop cap fill style. You must pass the numeric value that corresponds to the 'FillStyleName'.
Parameters
FillStyleName: any Enclose custom styles in quotation marks.
Fill10!
Fill100!
Fill20!
Fill30!
Fill40!
Fill5!
Fill50!
Fill60!
Fill70!
Fill80!
Fill90!
FillButton!
NoFill!
0
1
2
3
4
5
6
7
8
9
10
11
127
Example
In the following code fragment, the fill style used is 4. The PS object is the PerfectScript object.
'***** Declare the PerfectScript object
Dim PS as PerfectScript
'***** Allocate memory to the PerfectScript object
Set PS = new PerfectScript
'***** Begin Drop Cap
PS.DropCapBegin
PS.DropCapCharacters 1
PS.DropCapCharacterSize 2
PS.DropCapFillStyle 4
'****** Set the border style
PS.DropCapBorderStyle 5
'***** End Drop Cap
PS.DropCapEnd Save_DropCapEnd_State
DropCapFontDlg
Syntax
DropCapFontDlg()
Description
Display the Drop Cap Font dialog box.
DropCapHorizontalAdjustment
Syntax
DropCapHorizontalAdjustment(Adjustment As Double)
Description
Specify the percentage of a drop cap that is located in the margin.
Parameters
Adjustment: numeric Percent.
DropCapIncludeDescender
Syntax
DropCapIncludeDescender(State)
Description
Allow descending characters in a drop cap.
Parameters
State: any No!
Yes! 0
1
DropCapIncludeDiacritic
Syntax
DropCapIncludeDiacritic(State As _DropCapIncludeDiacritic_State_enum)
Description
Include diacritic marks in a drop cap.
Parameters
State: enumeration No!
Yes!
DropCapKerning
Syntax
DropCapKerning(Adjustment As Integer)
Description
Specify the spacing between drop cap characters.
Parameters
Adjustment: measurement The amount of space between drop cap characters.
DropCapNoWrap
Syntax
DropCapNoWrap(State)
Description
Prevent text from wrapping around a drop cap.
Parameters
State: any No!
Yes! 0
1
DropCapOff
Syntax
DropCapOff()
Description
End the drop cap of the current paragraph.
DropCapPositionOtherDlg
Syntax
DropCapPositionOtherDlg()
Description
Display the Drop Cap Position dialog box.
DropCapSizeDlg
Syntax
DropCapSizeDlg()
Description
Display the Drop Cap Size dialog box.
DropCapVerticalAdjustment
Syntax
DropCapVerticalAdjustment(Adjustment As Double)
Description
Specify the number of blank lines between a drop cap and the text that follows it.
Parameters
Adjustment: numeric The number of blank lines between the text and the drop cap.