AutoCorrectEntries (collection)

<< Click to Display Table of Contents >>

AutoCorrectEntries (collection)

Access path: Application à AutoCorrect à Entries

 1  Description

The AutoCorrectEntries collection contains all SmartText entries defined in PlanMaker. The individual elements of this collection are of the type AutoCorrectEntry.

 2  Access to the collection

There is exactly one instance of the AutoCorrectEntries collection during the whole runtime of PlanMaker. It is accessed through Application.AutoCorrect.Entries:

' Create a SmartText entry named "sd" containing "sales department"

pm.Application.AutoCorrect.Entries.Add "sd", "sales department"

 3  Properties, objects, collections and methods

Properties:

Count R/O

 

Objects:

Item AutoCorrectEntry (default object)

Application Application

Parent AutoCorrect

 

Methods:

Add

Count (property, R/O)

Data type: Long

Returns the number of the AutoCorrectEntry objects, i.e. the number of the currently defined SmartText entries.

Item (pointer to object)

Data type: Object

Returns an individual AutoCorrectEntry object, i.e. the definition of an individual SmartText entry.

Which AutoCorrect object you get depends on the value that you pass to Item: either the numeric index or the name of the requested SmartText entry. Examples:

' Show the contents of the first defined SmartText entry

MsgBox pm.Application.AutoCorrect.Entries.Item(1).Value

 

' Show the contents of the SmartText entry with the name "sd"

MsgBox pm.Application.AutoCorrect.Entries.Item("sd").Value

Application (pointer to object)

Data type: Object

Returns the Application object.

Parent (pointer to object)

Data type: Object

Returns the parent object, i.e. AutoCorrect.

Add (method)

Add a new AutoCorrectEntry entry.

Syntax:

 Add Name, Value

Parameters:

Name (type: String): The name of the new SmartText entry. If the name is empty or already exists, the call of the method fails.
Value (type: String): The text for the new SmartText entry. If the passed string is empty, the call of the method fails.

Return type:

Object (an AutoCorrectEntry object which represents the new SmartText entry)

Example:

' Create a SmartText entry named "sd" containing "sales department"

pm.Application.AutoCorrect.Entries.Add "sd", "sales department"