Skip to content
Go to file
Cannot retrieve contributors at this time
32 lines (27 sloc) 1015 Bytes
Option Explicit
'Macro Name: Kaveh_Eq_ChangeFont()
'Version: 1.0
'Description: This macro changes the font of all equations in a MS Word document.
'This Macro is developed by Kaveh Bakhtiyari, and it is copyrighted.
'You can use this macro for free, but do not remove this copyright header.
Sub Kaveh_Eq_ChangeFont()
If Not ActiveDocument.Saved Then
If vbYes = MsgBox("Do you want to save your document?", vbYesNo, "Save document") Then
End If
End If
Dim FontName As String
FontName = InputBox("Enter your font name (e.g. Latin Modern Math)", "Math Font Name", "Latin Modern Math")
Dim i As Integer
For i = 1 To ActiveDocument.OMaths.Count
'Selection.Font.Size = 12
Selection.Font.Name = FontName
Next i
MsgBox i & " equations were updated."
End Sub
You can’t perform that action at this time.