Class OMathAutoCorrect (Word VBA)

The class OMathAutoCorrect represents the math AutoCorrect feature in Microsoft Word. To access the math AutoCorrect entries, use the OMathAutoCorrectEntries collection.

Set

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

Dim oma as OMathAutoCorrect
Set oma = Application.OMathAutoCorrect

OMathAutoCorrect class variables can be set using the Application.OMathAutoCorrect procedure.

Entries

Returns an OMathAutoCorrectEntries collection that represents the collection of equation autocorrect entries within the equation autocorrect feature.

Dim omasEntries As OMathAutoCorrectEntries
Set omasEntries = Application.OMathAutoCorrect.Entries

Functions

Returns an OMathRecognizedFunctions collection that represents the recognized functions that are automatically corrected using the equation autocorrect feature.

Dim omrsFunctions As OMathRecognizedFunctions
Set omrsFunctions = Application.OMathAutoCorrect.Functions

Parent

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

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

ReplaceText

Returns or sets a Boolean that represents whether Microsoft Word automatically replaces strings in equations with the corresponding math AutoCorrect definitions.

Application.OMathAutoCorrect.ReplaceText = True

UseOutsideOMath

Returns or sets a Boolean that represents whether Microsoft Word uses math autocorrect rules outside equations in a document.

Application.OMathAutoCorrect.UseOutsideOMath = True