Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm calling

"c:\Program Files\Microsoft Office\Office14\WINWORD.EXE" /q /n myDoc.docx /mfileprintdefault /mfileexit 

It prints and does not exit, which is a problem when called in a loop within a batch file.

share|improve this question
If you just run it once from the command-line (not in a batch) does it exit when done? What's the actual name of the path/file you are trying to print? Does it have spaces? If so, are you wrapping it in quotes? How about if you remove the call to the print macro, will it then open and close for each as expected when in a batch? – Ƭᴇcʜιᴇ007 Nov 1 '11 at 20:48
When run from the command line, it just waits for Word to be manually closed. I can specify the file as "mydoc.docx" or mydoc.docx, and both ways respond the same way. Could it be a macro security issue, for quitting, if the printing works just fine? – JoshRoss Nov 1 '11 at 21:04
/mfileexit does not seem to work by itself. – JoshRoss Nov 1 '11 at 21:07
You have to call /mFileClose before calling /mFileExit. Go figure. – JoshRoss Nov 1 '11 at 21:33
Close the file b4 exiting? Sounds about right. – surfasb Nov 2 '11 at 5:05

Please try the following argument, it worked for me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.