Using Microsoft Office 2007, and Windows XP. In Access 2007 a Word document is created, text is added, and Word closed with VBA. Then unable to open the document because it is 'locked by user'.
***********Code*********************
Dim wo As Word.Application
Dim path As String
Set wo = CreateObject("Word.Application")
wo.Documents.Add
wo.ActiveDocument.SaveAs FileName:=path
'Text added to the document
wo.ActiveDocument.Save
wo.ActiveDocument.Close False
wo.Quit
Set wo = Nothing
**********End of Code******************
The code is successful in creating the document and when looking in the directory, the file is there but with ~owner's file. When attempting to open the file with VBA, the message states the file is locked by the user who created the file.