Class OMath (Word VBA)

The class OMath represents an equation. OMath objects are members of the OMaths collection.

The main procedures of class OMath are OMathArgs.Add and OMaths.Add

For Each

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

Dim omd As OMathDelim: Set omd = 
Dim omhE As OMath
For Each omhE In omd.E
	With omhE
		
	End With
Next omhE

Themes

The following procedures in this class have been grouped together and are described on a separate theme page

Add with its procedures OMathArgs.Add and OMaths.Add

Properties

AlignPoint returns or sets a Long that represents the character position of the alignment point in the equation.

7 
omh.AlignPoint =

ArgIndex returns a Long that represents the argument index of this component relative to the containing math object.

7 
Dim lngArgIndex As Long
lngArgIndex = omh.ArgIndex

ArgSize returns or sets a Long that represents the script size of an argument, for example, text, script, or script-script.

7 
omh.ArgSize =

Breaks returns an OMathBreaks collection that represents the line breaks in an equation.

7 
Dim ombsBreaks As OMathBreaks
Set ombsBreaks = omh.Breaks

Functions returns an OMathFunctions collection that represents the functions contained within an equation.

7 
Dim omfsFunctions As OMathFunctions
Set omfsFunctions = omh.Functions

Justification returns or sets a WdOMathJc that represents the justification for an equation.

7 
omh.Justification = wdOMathJcCenter

NestingLevel returns a Long that represents the nesting level for an OMath object.

7 
Dim lngNestingLevel As Long
lngNestingLevel = omh.NestingLevel

Parent returns an object that represents the parent object of the specified OMath object.

7 
Dim objParent As Object
Set objParent = omh.Parent

ParentArg returns an OMath object that represents the parent, or containing, argument.

7 
Dim omhParentArg As OMath
Set omhParentArg = omh.ParentArg

ParentCol returns an OMathMatCol object that represents the parent column in a matrix.

7 
Dim ommParentCol As OMathMatCol
Set ommParentCol = omh.ParentCol

ParentFunction returns an OMathFunction object that represents the parent, or containing, function.

7 
Dim omfParentFunction As OMathFunction
Set omfParentFunction = omh.ParentFunction

ParentOMath returns an OMath object that represents the parent element.

7 
Dim omhParentOMath As OMath
Set omhParentOMath = omh.ParentOMath

ParentRow returns an OMathMatRow object that represents the parent row in a matrix.

7 
Dim ommParentRow As OMathMatRow
Set ommParentRow = omh.ParentRow

Range returns a Range object that represents the portion of a document that is contained in the specified object.

7 
Dim rngRange As Range
Set rngRange = omh.Range

Type returns or sets a WdOMathType constant that represents whether an equation is displayed inline with the text around it or displayed on its own line.

7 
omh.Type = wdOMathDisplay

OMathArgs.Count returns the number of items in the OMathArgs collection.

Dim omas As OMathArgs: Set omas =  
Dim lngCount As Long
lngCount = omas.Count

OMathArgs.Parent returns an object that represents the parent object of the specified OMathArgs object.

Dim omas As OMathArgs: Set omas =  
Dim objParent As Object
Set objParent = omas.Parent

OMaths.Count returns the number of items in the OMaths collection.

Dim lngCount As Long
lngCount = ActiveDocument.Range.OMaths.Count

OMaths.Parent returns an object that represents the parent object of the specified OMaths object.

Dim objParent As Object
Set objParent = ActiveDocument.Range.OMaths.Parent