#1
|
|||
|
|||
Winword does not close as macro edits multiple files
FIXED: Application.Quit SaveChanges:=wdSaveChanges
I recorded a macro that edits an existing header and then does a save and close on the file. Works fine for single use. When I try to run the macro against all the files in a directory, Word does not close between file edits. A blank document is presented and I have to close word to let the cmd file step to the next file. cmd file... for /r %%A in (*.docx) do call "C:\Program Files\Microsoft Office\root\Office16\winword.exe" /q "%%A" /mRefHeader T han K s Last edited by twkralnc; 12-15-2017 at 12:06 PM. Reason: solved |
Tags |
macro in word |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run a macro on multiple docx. files | Peter Carter | Word VBA | 27 | 12-15-2022 04:10 PM |
Macro for multiple RTF files | papapaleo | Word VBA | 1 | 07-28-2017 04:56 AM |
Macro Winword mailmerge split printpage with mergefield as filename | pca | Word VBA | 2 | 02-28-2014 02:43 PM |
looking for macro for multiple files | bolk | Word | 3 | 05-03-2011 05:46 AM |
macro to pull data from multiple files | psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |