我在表单中创建Word文档后,用如下代码只关闭了打开的文档,但无法关闭Word
Dim workspace As New NotesUIWorkSpace
Dim uidoc As NotesUIDocument
Set uidoc=workspace.CurrentDocument
Dim session As New Notessession
Dim note As NotesDocument
Set note=uidoc.Document
Dim Word As Variant
Dim WordDoc As Variant
Dim rtitem As Variant
Dim Embed As notesembeddedobject
Dim sOleField As String
Dim Selection As Variant
Dim oleClass As String
Dim handle As Variant
If note.HasEmbedded Then
Set rTitem=note.GetFirstItem("Body")
Set Embed=rtitem.EmbeddedObjects(0)
Set handle=Embed.Activate(True)
Call handle.save
Call handle.close
Call handle.application.quit '执行到此句后提示automation错误