• Laura Whiting

The Putdocx Command – Add a Describe Table to Your Document

The putdocx command was added in Stata 15 and expanded with new features in Stata 16. It allows you to create a word document entirely from within Stata. The command includes options for formatting text and adding tables and images to the word document. For more information on how to format the document check out this Formatting tip, and to learn how to add tables check out this Adding Tables tip.


Unfortunately the putdocx command doesn’t include an option to add simple summary tables generated using commands such as summarize, describe or tabulate. However, for each of these commands there is a way to add the information to a word document using putdocx. In this post we are going to show you how to add output from the describe command.


How to Use:

Worked Example:

In this example I use the Stata auto example dataset. I describe this dataset and add the output to a MS Word document using the putdocx command. In the command pane I type the following:

Below is an image of the MS Word file produced:


1 view

© 2020 by Survey Design and Analysis Services. 

  • LinkedIn
  • Facebook
  • Twitter