Class OMathFunctions (Word VBA)
The class OMathFunctions represents a collection of functions or structures that Microsoft Word supports, such as fractions, integrals, sums, and radicals. To use a OMathFunctions class variable it first needs to be instantiated, for example
Add
Inserts a new structure, such as a fraction, into an equation at the specified position and returns an OMathFunction object that represents the structure.
Add (Range, Type, NumArgs, NumCols)
Dim omfs As OMathFunctions: Set omfs =
Dim omf As OMathFunction
Set omf = omfs.Add(Range:=, Type:=wdOMathFunctionAcc)
Arguments
The following arguments are required:
Range (Range) - The place at which to insert an equation.
Type (WdOMathFunctionType) - The type of equation to insert.
Here you can find possible values for
Optional arguments
The following argument is optional
NumCols (Long) - The number of columns in the equation.
NumArgs (Long) - The number of arguments in the equation.
Count
Returns the number of items in the OMathFunctions collection.
Dim omfs As OMathFunctions: Set omfs =
Dim lngCount As Long
lngCount = omfs.Count
Item
Returns an OMathFunction object that represents the specified item in the collection.
Item (Index)
Index: Specifies the ordinal position of the object within the collection.
Dim omfs As OMathFunctions: Set omfs =
Dim omf As OMathFunction
Set omf = omfs(Index:=1)