I am trying to use SendKeys to configure the Equation Editor. I have
similair code for defining format spacing that works fine, but I am having a
problem setting the Styles definitions. Below is the code to change the
"Text" in the equation editor to Arial. It does not seem to work:
Dim ReturnValue
ReturnValue = Shell(C:\Program Files\Common Files\Microsoft
Shared\Equation\EQNEDT32.EXE",1)
AppActivate ReturnValue
SendKeys "%S", True
SendKeys "+D", True
Sendkeys "{TAB}{TAB}Arial{ENTER}",True
Any other suggestion?
Hi Dennis,
You could use an EQUATION field (or an empty field) instead of the Equation
Editor, and simply input the text in whatever format you require.
For example (based on a solution I provided for another thread recently):
Sub Overline()
Dim sChar As String
Dim i As Integer
sChar = InputBox("Enter characters to overline", "Overline")
With Selection
For i = 1 To Len(sChar)
.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
PreserveFormatting:=False
.Delete Unit:=wdCharacter, Count:=1
With .Font
.Name = "Arial"
.Size = 22
.Bold = True
End With
.TypeText Text:="EQ \s\up6(\f(," + Mid(sChar, i, 1) + "))"
.Fields.Update
.MoveRight Unit:=wdCharacter, Count:=1
Next
End With
End Sub
Cheers
> I am trying to use SendKeys to configure the Equation Editor. I have
> similair code for defining format spacing that works fine, but I am having a
[quoted text clipped - 10 lines]
>
> Any other suggestion?