主题:如何销毁程序里引用了一个Word进程?
程序如下:
Set oWord = CreateObject("Word.Application")
Set odoc = oWord.Documents.Open(App.Path & "\dwy.doc")
Set myrange = ActiveDocument.Range
Documents(App.Path & "\dwy.doc").Close
Set oWord = CreateObject("Word.Application")
Set odoc = oWord.Documents.Open(App.Path & "\dwy.doc")
Set myrange = ActiveDocument.Range
Documents(App.Path & "\dwy.doc").Close