我想在手动打开文件后激活/打开 word 中的嵌入式 excel。显示 excel 内容后,要将更改保存到 same document。但是,
ActiveDocument.Save
在此代码中没有保存更改。
Sub Document_Open()
activateObject
'MsgBox "activating excel object"
End Sub
Sub activateObject()
With ActiveDocument
Set oShape = .InlineShapes(1) 'The embedded object is the first InlineShape.
'Set oShape = .Shapes(1) 'The embedded object is the first Shape.
Set oOLEFormat = oShape.OLEFormat
oOLEFormat.Open
ActiveDocument.Save
End With
End Sub