Class OMathAutoCorrectEntry (Word VBA)

The class OMathAutoCorrectEntry represents an individual entry in the OMathAutoCorrectEntry collection.

Set

To use a OMathAutoCorrectEntry class variable it first needs to be instantiated, for example

Dim oma as OMathAutoCorrectEntry
Set oma = Application.OMathAutoCorrect.Entries(Index:=1)

The following procedures can be used to set variables of type OMathAutoCorrectEntry: OMathAutoCorrect.Entries, OMathAutoCorrectEntries.Add and OMathAutoCorrectEntries.Item

For Each

Here is an example of processing the OMathAutoCorrectEntry items in a collection.

Dim omaEntry As OMathAutoCorrectEntry
For Each omaEntry In Application.OMathAutoCorrect.Entries
	
Next omaEntry

OMathAutoCorrectEntries.Add

Creates an equation auto correct entry and returns an OMathAutoCorrectEntry object.

Syntax : expression.Add (Name, Value)

Dim strName As String: strName = 
Dim strValue As String: strValue =  
Dim oma As OMathAutoCorrectEntry
Set oma = Application.OMathAutoCorrect.Entries.Add(Name:=strName, Value:=strValue)

Arguments

The following arguments are required:

Name (String) - The name of the autocorrect entry. Corresponds to the Name property of the OMathAutoCorrectEntry object.

Value (String) - The value of the autocorrect entry. Corresponds to the Value property of the OMathAutoCorrectEntry object.

OMathAutoCorrectEntries.Count

Returns the number of items in the OMathAutoCorrectEntries collection.

Dim lngCount As Long
lngCount = Application.OMathAutoCorrect.Entries.Count

OMathAutoCorrectEntries.Item

Returns an OMathAutoCorrectEntry object that represents the specified item in the collection.

Syntax : expression.Item (Index)

Index: Specifies a String or Integer that represents the name or ordinal position of the object in the collection.

Dim oma As OMathAutoCorrectEntry
Set oma = Application.OMathAutoCorrect.Entries(Index:=1)

OMathAutoCorrectEntries.Parent

Returns an object that represents the parent object of the specified OMathAutoCorrectEntries object.

Dim objParent As Object
Set objParent = Application.OMathAutoCorrect.Entries.Parent

Delete

Deletes the specified equation auto correct entry.

Application.OMathAutoCorrect.Entries(1).Delete

Index

Returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = Application.OMathAutoCorrect.Entries(1).Index

Name

Returns or sets a String that represents the name of an equation auto correct entry.

Application.OMathAutoCorrect.Entries(1).Name =

Parent

Returns an object that represents the parent object of the specified OMathAutoCorrectEntry object.

Dim objParent As Object
Set objParent = Application.OMathAutoCorrect.Entries(1).Parent

Value

Returns or sets a String that represents the contents of an equation auto correct entry.

Application.OMathAutoCorrect.Entries(1).Value =