SetUserDictionary method (ILEADRasterDocument)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short SetUserDictionary (BOOL bCreateUD);

Overview

Refer to Working with a Dictionary

Remarks

Creates a new user dictionary in memory, opens an existing user dictionary, or saves a user dictionary to a file.

To create a new user dictionary in memory, call this method with the bCreateUD parameter set to TRUE. (If there is currently a user dictionary open, this method will save that dictionary in the file specified in the DictionaryFileName property, disable that user dictionary and create a new one.

To open an existing user dictionary stored in a file, set the DictionaryFileName property to the name of the file to load and call this method with the bCreateUD parameter set to FALSE.

To save a newly created user dictionary that contains items added using the AddItemToUserDictionary method,

image\sqrblit.gif Set the DictionaryFileName property to the name of the file in which to save the user dictionary

image\sqrblit.gif Set the DictionaryDefaultSection property to the desired section name in the user dictionary

image\sqrblit.gif Set the DictionaryItemAttribute property to indicate whether to save the added items as literals or regular expressions

image\sqrblit.gif Call this method with the bCreateUD parameter set to FALSE to save the dictionary to the file.

See Also

Elements:

DictionaryFileName property, DictionaryState property, GetUserDictionarySection method, GetUserDictionarySectionItem method, AddItemToUserDictionary method, RemoveItemFromUserDictionary method, DictionaryDefaultSection property, DictionaryItemAttribute property

Topics:

Quick Reference OCR: Working with a Dictionary