I have just added support for the bysort prefix with tabulation commands in asdoc. Details and examples can be found here https://fintechprofessor.com/2020/03...n-asdoc-stata/

The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
Code:
net install asdoc, from(http://fintechprofessor.com) replace
Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.

Please do remember to cite asdoc. To cite:
In-text citation
Tables were created using asdoc, a Stata program written by Shah (2018).

Bibliography
Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.