ms-wordexportstatastata-macrosasdoc

Export browse window to MS Word using Stata asdoc


How can I export the contents of the Stata browse window to MS Word? I'm currently using the asdoc command. However, any method outside "copy and paste" is acceptable.

my attempt

ssc install asdoc, replace
sysuse auto

asdoc, row( make, price, mpg, rep78, headroom, trunk, weight, length, turn, displacement, gear_ratio, foreign ) title(Test Table)


Solution

  • You can use the code below to export the current dataset or its subsets to MS Word

    ssc install asdoc, replace
    sysuse auto
    asdoc list make price mpg rep78 headroom trunk weight length turn displacement gear_ratio foreign in 1/10 , replace
    

    to export without inputting the variable names

    asdoc list * in 1/10 , replace
    

    and to export the entire dataset, simply remove the in

    asdoc list * , replace