Batch converting word files to PDF

Today I had to convert hundreds of .doc files to .pdf. I first thought it would be impossible because there would be not such option or command line option on MS-Word. But surprisingly, this great tutorial shows how using powerful command line arguments for MS-Word.

http://raywoodcockslatest.blogspot.com.br/2012/03/batch-converting-many-microsoft-word.html

From the page above (with a little change):

FOR /F “usebackq delims=” %%g IN (`dir /b “*.doc”`) DO “C:\Program Files\Microsoft Office\OFFICE12\WINWORD.EXE” “%%g” /q /n
/mFilePrintDefault /mFileExit && TASKKILL /f /im winword.exe

this batch will get all the doc files on a directory and convert them to PDF by using the default printer, which is configured to print to PDF files.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s