Category Archives: Equations

No Thumbnail

Word VBA, Delete Equations

In order to delete an equation using VBA for word, you will have to know its index. Equations are referenced through the OMaths collection. In the example the below the first equation in the document is removed along with all its text: OMaths.Item(1).Range.Select Selection.Delete Before: After:

No Thumbnail

Word VBA Creating Equations

In this article I will explain how you can create equations using VBA for word. – Step 1, Getting the Text String Associated with the Equation: The first step for creating an equation in VBA for word is to determine the text string associated with

No Thumbnail

Word VBA, Looping Through Equations

Equations in a word document can be referenced through the OMaths collection: Sub Example1() Dim i As Integer For i = 1 To OMaths.Count     ‘your code here Next i End Sub You can reference each equation using the statement below: OMaths.Item (i) See also: Word VBA Creating

No Thumbnail

Word VBA, Get the Unicode Value of Each Character in the Equation

In this article I have provided a function that returns the unicode values associated with the characters in an equation. The function below takes as input the index of an equation and returns an array. The array contains the unicode values associated with the characters in the

No Thumbnail

Word VBA Equations Linear/Professional Display

In this article I will explain how you can use VBA for Word to change the way equations are displayed in a word document. For more information about working with equations please see the link below: Word VBA, Equations – Equation Linear Display: Equations can be