How to apply formatting to multiple MS Word Documents?

Hello,

Every month I need to convert hundreds of Word .doc's from one type of formatting to the next. For example, all the .docs come to me saved in Ariel 14 and I need to convert them all to Courier New 5 in Landscape mode.

As it stands now, I need to open the documents one by one, use a macro to convert them to the proper formatting, and then save the file (same file name).

I am looking for something that will take all the files in a directory, apply the proper formatting, and save the files..

Any ideas?

The Phlebob2007-08-22T16:51:54Z

Favorite Answer

You have the macro, and that's 90% of the work. I think a batch (.bat) file could do the rest. NOTE: THIS CODE IS GIVEN FREE, WITH NO WARRANTY. TEST IT CAREFULLY.

Cut and paste this into a file and give it a name with the extension ".bat" (without the quote marks).

for %%x in (*.doc) do "c:\Program Files\Microsoft Office\Office10\winword.exe" /m[macroname] "%%x"
(without the [ ]; quote marks here are needed)

You may have to add a few lines to the macro to close Winword when it's finished.

ActiveDocument.Save
Application.Quit

Good luck.