K
Kedd123
The following code works the first (or first few) times:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Documents.Open "Drive and Filename"
oApp.PrintOut
oApp.Documents.Close
oApp.Quit
Set oApp = Nothing
but at some point the following message box begins appearing:
File in Use
File.doc is locked for editing by 'userid'
Do you want to:
Open a read only copy
Create a local copy and merge your changes later
Receive notification when the original copy is availabe
When Open a read only copy is chosen the "save as" dialog box appears as
well as another Access message box stating the file is read only.
I have verified the file is NOT open by looking in the folder using explorer
and looking for a "lock" file.
My goal is to print the document without any of these dialog boxes
appearing. I would like to print the file without running the word
application and opening the file, but I do not know how to do write that code.
Any help is greatly appreciated!
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Documents.Open "Drive and Filename"
oApp.PrintOut
oApp.Documents.Close
oApp.Quit
Set oApp = Nothing
but at some point the following message box begins appearing:
File in Use
File.doc is locked for editing by 'userid'
Do you want to:
Open a read only copy
Create a local copy and merge your changes later
Receive notification when the original copy is availabe
When Open a read only copy is chosen the "save as" dialog box appears as
well as another Access message box stating the file is read only.
I have verified the file is NOT open by looking in the folder using explorer
and looking for a "lock" file.
My goal is to print the document without any of these dialog boxes
appearing. I would like to print the file without running the word
application and opening the file, but I do not know how to do write that code.
Any help is greatly appreciated!