B
Brad Marshall
I have read many, many posting on this subject but none come close to my
scenario, which is:
1) I have this code snuipped from an Access 2003 application that creates
documents mased on templates and inserts values from an Access table:
'Start of Code Snippet.
.... (some code)
Set objWord = New Word.Application
With objWord
' open a new templat instance.
.Documents.Add Template:=(strDocPath)
' save the document in the default dir.
.ActiveDocument.SaveAs FileName:=stNewDocName,
FileFormat:=wdFormatDocument
.Documents(stNewDocName).Activate
End With
.... (some code that sets the bookmarks in the document(s) to appropriate
values
With objWord
' close the document and save the change.
.Documents(stNewDocName).Close SaveChanges:=wdSaveChanges
' quit word
.Quit
End With
End of code snippet
Under Windows 2000 and Office XP this worked fine, but under Windows 2003 &
Office 2003 the .Close statement generates the "This file is in use by
another application or user" message citing Normal.Dot. I am stumped. Any
ideas?
Thanks, Brad Marshall
scenario, which is:
1) I have this code snuipped from an Access 2003 application that creates
documents mased on templates and inserts values from an Access table:
'Start of Code Snippet.
.... (some code)
Set objWord = New Word.Application
With objWord
' open a new templat instance.
.Documents.Add Template:=(strDocPath)
' save the document in the default dir.
.ActiveDocument.SaveAs FileName:=stNewDocName,
FileFormat:=wdFormatDocument
.Documents(stNewDocName).Activate
End With
.... (some code that sets the bookmarks in the document(s) to appropriate
values
With objWord
' close the document and save the change.
.Documents(stNewDocName).Close SaveChanges:=wdSaveChanges
' quit word
.Quit
End With
End of code snippet
Under Windows 2000 and Office XP this worked fine, but under Windows 2003 &
Office 2003 the .Close statement generates the "This file is in use by
another application or user" message citing Normal.Dot. I am stumped. Any
ideas?
Thanks, Brad Marshall