English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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?

2007-08-22 07:30:43 · 1 answers · asked by Stupidog 5 in Computers & Internet Software

1 answers

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.

2007-08-22 12:51:54 · answer #1 · answered by The Phlebob 7 · 0 0

fedest.com, questions and answers