Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Word 2013 from command line

Some of our clients have a problem we can not reproduce here inhouse: Out software uses MS-Word for producing form letter. Since some of our clients use Office 2013, this function won't work anymore.
We tried to reproduce this and detect that on the affected systems Word won't start from command line. Starting via the link in the startmenu works. It also works to start Excel from command line.

Does anyone have an idea what the problem is and how to solve it?

like image 283
Michael Avatar asked Jul 23 '13 15:07

Michael


2 Answers

You can try using start.exe from the command line:

c:> start winword

I'm wasn't familiar with it but tried it and it worked for me on Windows 7, with Office 2007. Found this site (windows-commandline.com). They claim it works for all versions of Word.

like image 190
zako42 Avatar answered Sep 21 '22 15:09

zako42


Just an FYI similar to Word for Excel on command line and parameters

c:\> start excel "file path and location"

c:\> start excel "c:\somepath\myfile.xlsx"

worked for us to open a file created in VB 6.0 for Excel 2013

c:\excel does not work on command line for us either

I think WinWord will work with a file parameter too.

c:\> start winword "c:\somepath\myfile.doc"
like image 20
shack Avatar answered Sep 21 '22 15:09

shack