OLEオブジェクトはどうやれば操作できるんでしょう?
OLEオブジェクト(Wordでの数式)の編集は中々できないですね。
タッチの差で回答が終了になってしまいましたが、ここで要望のことができるプログラムを掲載しておきます。
Option Explicit Sub GetEquation() ' (1)EQNEDT32.EXEの場所が違う場合は適宜調整 Const sMathEdit As String = "C:\Program Files\Common Files\Microsoft Shared\EQUATION\EQNEDT32.EXE" Dim oMath As InlineShape Dim vPID As Variant vPID = Shell(sMathEdit, vbNormalFocus) If vPID = 0 Then Exit Sub Selection.WholeStory For Each oMath In Selection.InlineShapes oMath.OLEFormat.DoVerb VerbIndex:=1 Waitfew (2) SendKeys ("%EL"), True Waitfew (2) SendKeys ("%EC"), True Waitfew (2) SendKeys ("%FX"), True Waitfew (2) AppActivate vPID Waitfew (2) SendKeys ("%EP"), True SendKeys ("{ENTER 2}"), True Waitfew (2) Next End Sub '少し待つ Sub Waitfew(iWait As Integer) ' Application.wait (Now + TimeValue(sWait)) wordにwaitメソッドなし Dim Start Start = Timer Do While Timer < Start + iWait DoEvents Loop End Sub
(1)のところは、EQNEDT32.EXEの場所が違う場合、それにあった物に変更ください。
デフォルトでインストールしてある場合は、変更不要です。