Attaullah Shah
Moderator
Post count: 70

The default setting in asdocx is to append results to the same file which you used previously in the save() option. If you did not use the save() option, then the default name of “Myfile.docx” is used.
If you want to save the results to a new file, use the save() option with filename in the brackets. So, to write results to Results2, the code will be:

bys activityear: asdocx sum amtfunded2 if clientstate1=="Maryland", save(Results2)