Hi All
Ive been trying for hours to close a word document i have.
I open it from Access VBA with the following code
But it doesnt completely close the Word document; instead it leaves a temporary file called '~$nfirmation Of Instructions - Capital Visas' which indicates to me that the document isnt closed. Also when i try to view the original document it says i can view it read only.
Can someone please help me on how to completely close and Save the document.
Thanks
Ive been trying for hours to close a word document i have.
I open it from Access VBA with the following code
Code:
[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Dim MSWord As New Word.Application
Set MSWord = New Word.Application[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]MSWord.Documents.Open FileName:="V:\Confirmation Of Instructions - Capital Visas"[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]MSWord.Selection.TypeText Text:="Line 1"[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]MSWord.Documents.Close[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Set MSWord = Nothing[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]
But it doesnt completely close the Word document; instead it leaves a temporary file called '~$nfirmation Of Instructions - Capital Visas' which indicates to me that the document isnt closed. Also when i try to view the original document it says i can view it read only.
Can someone please help me on how to completely close and Save the document.
Thanks