how to close a Word file from DOS?

A

adi.samba

I have a word file "Test.doc". I want to close this file from a command from
DOS. I don't know how to do that. Can anybody help me with an example? I do
not want to kill the Word process, I only want to close this particular file
from the Word application.
 
T

Tom [Pepper] Willett

Why do you need to close it from a command instead of from within Word?

:I have a word file "Test.doc". I want to close this file from a command
from
: DOS. I don't know how to do that. Can anybody help me with an example? I
do
: not want to kill the Word process, I only want to close this particular
file
: from the Word application.
 
A

adi.samba

Because I use the DOS commands from my java code as in next example:

Process p = r.exec("cmd.exe /c tskill winword");

But the upper command will close my Word application, and I do not want
that, I want to close only Test.doc file.
 
A

adi.samba

What do you mean by "focus"? What command should I write in DOS shell in
order to close the word file?
 
Top