PSpell

Checks for misspelled words in the selected range, the active story, or all stories of the current publication. Selects the first unrecognized spelling it encounters.


Command constructor

PSpell(short cRange, PMBool bWrapAround, PMBool bAltSpell, PMBool bShowDup, PMBool bIgnore);
short cRange;
kFCSSelectedText to spell-check only selected text
kFCSCurrentStory to spell-check only the current story, starting from position of insertion point (default setting)
kFCSAllStories to spell-check all stories in current publication, starting from beginning of currently active story
kFCSDefault to use default or previously defined range
kParmDontCare to let system choose range based on current text selection. If text is selected, PSpell spell-checks only selected text; if no text is selected, PSpell spell-checks only the current story, starting from position of insertion point.
PMBool bWrapAround;
false to stop checking when PageMaker reaches end of story
true to continue checking from beginning of story when PageMaker reaches end of story (default setting)
PMBool bAltSpell;
false not to display alternative spellings in the Spelling dialog box
true to display alternative spellings in the Spelling dialog box
PMBool bShowDup;
false not to highlight a duplicate word
true to highlight a duplicate word (default setting)
PMBool bIgnore;
false to highlight each occurrence of an unrecognized word
true to highlight only first occurrence of an unrecognized word and ignore all other instances of it (default setting)
Story editor only. The PSpell command works only in story editor.

Current publication only. Unlike the Spelling dialog box, the PSpell command cannot search multiple publications. It can search only the stories in the currently active publication.

bWrapAround. PageMaker disregards the bWrapAround parameter in two cases, when cSearchRange is set to either:

Exceptions. If no misspelled words found and end of selection reached, PageMaker returns a CQ_SPELL_STATUS result, causing PSpell to throw this error code. You should probably catch this exception and discard it. If the Story editor is not active, PSpell throws a CQ_LO_INVALID_MODE exception and the command is ignored

Example. The following example begins spell-checking all the stories and selects the first unrecognized word.

PSpell(kFCSAllStories, true, true, true, true);


See also

The PAddWord, PRemoveWord, and PSpellWindow commands

The PGetPMInfo, PGetSpellResult, and PGetSpellWindow queries

Adobe PageMaker 6.5 Help > Commands > Utilities > Spelling


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support