I am using outreg in a foreach loop but I need to manually delete the previously created Word document each time I rerun the do file. If I wasn't using foreach, I could specify "replace" after the first outreg and then "merge" for the others. Is there a way to create an empty Word document- something like "save name.doc, replace"?
Here's a sample of the code:
foreach var of varlist $outcomes {
reg `var' x y z
outreg regressions.doc, merge
}
Here's a sample of the code:
foreach var of varlist $outcomes {
reg `var' x y z
outreg regressions.doc, merge
}
Comment